Update release.yml #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure user | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Github Actions" | |
- run: cd $GITHUB_WORKSPACE | |
- name: echo version | |
run: | | |
git remote update | |
git tag -l | |
- name: Tag and Publish | |
run: git tag -l | grep v$(make version) || make publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
after-release: | |
needs: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get latest release tag | |
id: get_latest_release | |
run: | | |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) | |
echo "latest_tag=$LATEST_TAG" >> $GITHUB_ENV | |
- name: Echo the latest release tag | |
run: | | |
echo "Name: ${{ env.latest_tag }}" | |