Skip to content
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
31 changes: 11 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,19 @@ permissions:
contents: read

jobs:
# release-please as the klconsultancy release GitHub App (its token, not GITHUB_TOKEN,
# so the release PR it opens triggers CI), from the shared reusable workflow. The App and
# its credentials live at the klconsultancy organization level.
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
# A GitHub App token instead of GITHUB_TOKEN, so the release PR it opens
# triggers CI (events from GITHUB_TOKEN start no new workflow runs). The App
# and its credentials live at the klconsultancy organization level.
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
- uses: googleapis/release-please-action@v5
id: release
with:
token: ${{ steps.app-token.outputs.token }}
permissions: {} # it acts as the app
uses: klconsultancy/workflows/.github/workflows/release-please.yml@c9502596494c47704b890d5cc66de73c06ba93d8 # main
with:
app-client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
secrets:
RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}

# Stays here, not in the reusable workflow: npm's trusted publisher is bound to this
# workflow file (release.yml) and the `npm` environment.
publish:
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
Expand Down
Loading