Skip to content

Commit

Permalink
[install] in archiver.yml, explicitly delete the versiontag and runni…
Browse files Browse the repository at this point in the history
…ngtag releases before re-creating them
  • Loading branch information
valassi committed Oct 1, 2024
1 parent 7bf12ff commit 30e0ba5
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/archiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,44 @@ jobs:
echo "" >> ${WORKDIR}/versiontag.txt
cat ${WORKDIR}/VERSION.txt | egrep '^(commit|TARBALL) ' >> ${WORKDIR}/versiontag.txt
- name: delete_versiontag_releaseonly
# See https://cli.github.com/manual/gh_release_delete
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-github-cli-in-workflows
run: |
echo "HOME is ${HOME}"
echo "Current directory is $(pwd)"
echo "WORKDIR is ${WORKDIR}"
cd branch_PR
echo "Current directory is now $(pwd)"
echo "Current branch is $(git branch --show-current)"
if gh release view ${{ env.TAGNAME }}; then
echo "Deleting release ${{ env.TAGNAME }}"
gh release delete ${{ env.TAGNAME }} -y
else
echo "Release ${{ env.TAGNAME }} does not exist"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: delete_runningtag_releaseandtag
# See https://cli.github.com/manual/gh_release_delete
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-github-cli-in-workflows
run: |
echo "HOME is ${HOME}"
echo "Current directory is $(pwd)"
echo "WORKDIR is ${WORKDIR}"
cd branch_PR
echo "Current directory is now $(pwd)"
echo "Current branch is $(git branch --show-current)"
if gh release view ${{ env.TAGNAME_LATEST }}; then
echo "Deleting release ${{ env.TAGNAME_LATEST }} and the associated tag"
gh release delete <tag> ${{ env.TAGNAME_LATEST }} -y --cleanup-tag
else
echo "Release ${{ env.TAGNAME_LATEST }} does not exist"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: create_runningtag
run: |
echo "HOME is ${HOME}"
Expand Down

0 comments on commit 30e0ba5

Please sign in to comment.