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
31 changes: 5 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@
# publish-github authenticates with GITHUB_TOKEN. The OIDC policies on npm and
# on crates.io must name this file (release.yml). GitHub links
# @bytelandtechnology/tunelet to this repository through the repository field.
#
# The release-please job uses a GitHub App token from vars.APP_CLIENT_ID and
# secrets.APP_PRIVATE_KEY. If vars.APP_CLIENT_ID or secrets.APP_PRIVATE_KEY is
# empty, the workflow skips release-please. Register the GitHub App on this
# repository with write access only to contents, issues and pull requests. When
# release-please updates the release pull request, ci.yml runs verify on
# head_sha automatically. A branch ruleset on main must require verify before
# merge.
# The release-please job uses the default GITHUB_TOKEN.
name: Release

on:
Expand All @@ -36,32 +29,18 @@ permissions: {}

jobs:
release-please:
if: ${{ vars.APP_CLIENT_ID != '' }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions: {}
env:
HAS_APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY != '' && 'true' || 'false' }}
permissions:
contents: write
issues: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
# If secrets.APP_PRIVATE_KEY is set, the action gets a one-hour GitHub
# App token for this repository and revokes it when the job ends.
- id: app-token
if: ${{ env.HAS_APP_PRIVATE_KEY == 'true' }}
uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
permission-contents: write
permission-issues: write
permission-pull-requests: write
- id: release
if: ${{ steps.app-token.outputs.token != '' }}
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
with:
token: ${{ steps.app-token.outputs.token }}

build-wasm:
needs: release-please
Expand Down
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ npm run verify:pack
to make it look better.
- Do not change fixed-point calculations to floating-point calculations.
- Do not edit the generated files in `pkg/` or `dist/`.
- Do not change `release-please` in `.github/workflows/release.yml` to a
GitHub App token. Keep `GITHUB_TOKEN` with write access to `contents`,
`issues` and `pull-requests`.

## Work method

Expand Down
Loading