-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Upload release assets #11566
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
Merged
Merged
Upload release assets #11566
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f129145
Upload release assets
cdce8p 05746f1
Update .github/workflows/release.yaml
cdce8p 0a70d03
Remove unnecessary checkout step
cdce8p 416a31f
Use helper action for asset upload
cdce8p 8adc7d4
Use softprops/action-gh-release action
cdce8p 5b91d0b
Code review
cdce8p 31cc0a1
Set default workflow permissions
cdce8p File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It already have this?
https://github.com/home-assistant/frontend/runs/5578172811?check_suite_focus=true#step:1:16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's recommended to limit the permissions to what's necessary.
https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
By adding only
contents: writeexplicitly, I exclude all other permission scopes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that is the reason behind it, it should be defined on the workflow as read, and then open each job to what they need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
31cc0a1 I checked the other jobs. None need additional permissions.
I wasn't sure about artifact upload / download, but after testing it seems to work just fine.
For the future, it might be worth considering to limit the default repo1 / org2 permissions for Github tokens.
With regards to the other workflows, only a few would need explicit permissions.
release-drafter->contents: writeto create pre-releaseslock3 andstale4 ->issues: writeandpull-requests: writeFootnotes
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository ↩
https://docs.github.com/en/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization ↩
https://github.com/dessant/lock-threads#examples ↩
https://github.com/actions/stale#recommended-permissions ↩
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uploading action artifacts needed "deployment" before, but if it works without anything that's just great 👍
As for changing the default of the entire org, I 100% agree with that, both in regards to the token, and potentially implementing an allow list for approved actions.