ci: release via a GitHub App token so main can release - #116
Merged
Conversation
main's required status checks reject any direct push whose commit has not been checked, including the release commit @semantic-release/git makes during prepare. GITHUB_TOKEN is github-actions[bot], which enforce_admins: false does not exempt, so every push to main failed with GH006 before anything was published. Mint an installation token from a release App instead, and list that App as a bypass actor on the main ruleset. github-actions[bot] cannot be a bypass actor itself: ruleset actors of type Integration must be GitHub Apps installed on the owning org, and the first-party Actions app is not installable. An admin PAT would also work, but it is a long-lived credential tied to a person that turns write access into an admin-bypass push; App tokens are installation-scoped and expire in about an hour. Drop the job's now-unused GITHUB_TOKEN write permissions. Only id-token remains, for npm provenance. Refs #113
Deploying audiobrowser with
|
| Latest commit: |
9fb9c57
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5c73b0d5.audiobrowser.pages.dev |
| Branch Preview URL: | https://ci-release-app.audiobrowser.pages.dev |
|
🎉 This PR is included in version 0.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
mainrequires status checks, which reject any direct push whose commit has not been checked — including the release commit@semantic-release/gitmakes during prepare.GITHUB_TOKENisgithub-actions[bot], which is not exempt, so every push tomainfailed with GH006 before anything was published.Mint an installation token from a release App instead, and list that App as a bypass actor on the
mainruleset.github-actions[bot]cannot be a bypass actor itself: ruleset actors of typeIntegrationmust be GitHub Apps installed on the owning org, and the first-party Actions app is not installable.Also drops the job's now-unused
GITHUB_TOKENwrite permissions.id-tokenstays — with noNPM_TOKENin the repo, OIDC is hownpm publishauthenticates, not just how provenance is signed.Already proven on
next: run succeeded and published0.2.0-next.8. This cherry-picks the same commit tomainsomaincan release again.