Skip to content

Update release.yml

Update release.yml #36

Workflow file for this run

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 }}"