Create latest tag explicitly

Apparently the github API does too much magic, lets hope removing a step will make it behave
This commit is contained in:
CptMoore
2023-07-30 09:48:11 +02:00
committed by GitHub
parent c8c7066969
commit f16f137f2b
+11 -5
View File
@@ -190,22 +190,28 @@ jobs:
mkdir dist/ mkdir dist/
mv artifacts/*_release/* dist/ mv artifacts/*_release/* dist/
- name: Delete Latest - name: Delete Latest Release and Tag
if: startsWith(github.ref, 'refs/tags/v') == false if: github.ref == 'refs/heads/master'
uses: dev-drprasad/delete-tag-and-release@v1.0 uses: dev-drprasad/delete-tag-and-release@v1.0
with: with:
delete_release: true
tag_name: "latest" tag_name: "latest"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Latest Tag
if: github.ref == 'refs/heads/master'
working-directory: ${{ inputs.checkout-directory }}
run: |
git tag -d latest || true
git tag latest
git push origin latest
- id: release_latest - id: release_latest
name: Release Latest name: Release Latest
if: startsWith(github.ref, 'refs/tags/v') == false if: github.ref == 'refs/heads/master'
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1
with: with:
allowUpdates: false
artifactErrorsFailBuild: true artifactErrorsFailBuild: true
artifacts: dist/* artifacts: dist/*
draft: false
generateReleaseNotes: true generateReleaseNotes: true
makeLatest: true makeLatest: true
name: "Latest (unstable)" name: "Latest (unstable)"