Release #48
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: | |
| bump: | |
| description: Version bump type | |
| required: true | |
| type: choice | |
| default: minor | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| force: | |
| description: Force release (bypass blockers) | |
| required: false | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| checks: read | |
| statuses: read | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| name: Release a new version | |
| steps: | |
| - name: Get auth token | |
| id: token | |
| uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 | |
| with: | |
| app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} | |
| private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} | |
| permission-checks: read | |
| permission-statuses: read | |
| permission-contents: write | |
| permission-pull-requests: write | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ steps.token.outputs.token }} | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| - name: Calculate version | |
| id: version | |
| run: | | |
| CURRENT=$(node -p "require('./packages/junior/package.json').version") | |
| NEW=$(npx semver -i ${{ inputs.bump }} $CURRENT) | |
| echo "current=$CURRENT" >> $GITHUB_OUTPUT | |
| echo "new=$NEW" >> $GITHUB_OUTPUT | |
| - name: Prepare release | |
| uses: getsentry/action-prepare-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | |
| with: | |
| version: ${{ steps.version.outputs.new }} | |
| force: ${{ inputs.force }} |