Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable artifact deletion #3447

Merged
merged 2 commits into from
Dec 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ jobs:

release:
permissions:
actions: write # for GeekyEggo/delete-artifact to delete artifacts
contents: write # for softprops/action-gh-release to create GitHub release
name: Release
needs: [build-win10, build-linux-release, macosx] # build-linux-win,macosx-qt5 is disabled
Expand All @@ -260,10 +261,9 @@ jobs:
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: ./*
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
Comment on lines -263 to -264
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setting never worked because it used a wrong secret name, thus it was equivalent to setting an empty env GITHUB_TOKEN.

The correct name is secrets.GITHUB_TOKEN, see https://docs.github.com/en/actions/learn-github-actions/contexts#secrets-context.


- name: Delete temp artifact
uses: GeekyEggo/delete-artifact@v2.0.0
- name: Delete temp artifacts
uses: GeekyEggo/delete-artifact@v4
with:
name: release
name: release-*
token: ${{ secrets.GITHUB_TOKEN }}