v7.2.0 #18
Workflow file for this run
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: Update Latest Tag | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- created | |
jobs: | |
update-latest-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.MY_GITHUB_TOKEN }} | |
- name: Set up Git | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
- name: Remove "latest" release | |
run: | | |
if git rev-parse refs/tags/latest >/dev/null 2>&1; then | |
git tag -d latest | |
git push origin :refs/tags/latest | |
else | |
echo "Tag 'latest' does not exist, skipping deletion." | |
fi | |
- name: Create new "latest" release | |
run: | | |
git tag latest | |
git push origin latest |