Repository navigation
Release #81
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
| name: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Version to release (or "auto") | |
| required: false | |
| force: | |
| description: Force a release even when there are release-blockers | |
| required: false | |
| merge_target: | |
| description: Target branch to merge into | |
| required: false | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| # Pin Node to an exact patched version (single source of truth). A floating | |
| # "22" can reuse the runner's pre-cached 22.23.0, which carries the | |
| # ERR_STREAM_PREMATURE_CLOSE regression on keep-alive fetch reuse | |
| # (nodejs/node#64004, fixed in 22.23.1). | |
| NODE_VERSION_22: "22.23.1" | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| name: Release a new version | |
| steps: | |
| - name: Get auth token | |
| id: token | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} | |
| private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ steps.token.outputs.token }} | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION_22 }} | |
| - name: Prepare release | |
| uses: getsentry/craft@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | |
| with: | |
| version: ${{ inputs.version }} | |
| force: ${{ inputs.force }} | |
| merge_target: ${{ inputs.merge_target }} |