Skip to content
Merged
Show file tree
Hide file tree
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
25 changes: 16 additions & 9 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,27 @@ jobs:
release:
name: Tag and publish a merged release
runs-on: ubuntu-latest
# Creating the release creates the `vX.Y.Z` tag. Only GitHub Actions may create `v*`
# tags in this repository, so this step uses the workflow token, not the App token.
# `pull-requests: write` lets release-please relabel the merged release PR as
# `autorelease: tagged` and comment the release link; without it, the next run would
# find the PR still pending and try to release it again.
permissions:
contents: write # create the vX.Y.Z tag and the GitHub release
pull-requests: write # relabel and comment on the merged release PR
# Creating the release creates the `vX.Y.Z` tag. Only the organization's release Apps may
# create `v*` tags (the "Restrict release tag creation" organization ruleset), so this step
# uses the App token, not the workflow token. The token's `pull-requests: write` lets
# release-please relabel the merged release PR as `autorelease: tagged` and comment the
# release link; without it, the next run would find the PR still pending and try to release
# it again. No workflow here runs on tags or releases, so an App-created release starts nothing.
permissions: {}
timeout-minutes: 10
steps:
- name: 🔑 Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
permission-contents: write # create the vX.Y.Z tag and the GitHub release
permission-pull-requests: write # relabel and comment on the merged release PR
- name: 🏷️ Tag and publish a merged release PR
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
with:
token: ${{ github.token }}
token: ${{ steps.app-token.outputs.token }}
skip-github-pull-request: true

release-pr:
Expand Down
3 changes: 2 additions & 1 deletion docs/marketplace-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Commit titles that squash merges leave on `main`. The
2. The release PR is an ordinary pull request. Review it like any other, and merge it when the
release should go out. Until then it keeps collecting the changes that land on `main`.
3. Merging it tags the merge commit `vX.Y.Z` and publishes a GitHub release with the same notes.
GitHub Actions creates the tag, which is the only identity allowed to create `v*` tags here.
The repository's GitHub App creates the tag: only the organization's release Apps may create
`v*` tags.

The version follows the commits merged since the last release:

Expand Down
Loading