Simplify Changesets releases and wait for registry visibility (#520) #252
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: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| # A version-PR merge must not be replaced by a later feature merge while waiting to publish. | |
| queue: max | |
| jobs: | |
| release: | |
| name: Changesets release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| registry-url: https://registry.npmjs.org | |
| - run: npm install -g npm@11.5.1 | |
| - run: corepack yarn install --immutable | |
| - run: corepack yarn tsc:utils | |
| - run: corepack yarn tsc:zod | |
| - run: corepack yarn tsc:node | |
| - name: Skip superseded versioning runs, not publications | |
| id: release_state | |
| run: node scripts/release-run.ts | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d | |
| if: steps.release_state.outputs.proceed == 'true' | |
| with: | |
| version: corepack yarn changeset:version:release | |
| publish: corepack yarn release:publish | |
| commitMode: github-api | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: "true" | |
| TRANSLOADIT_PUBLISH_PREBUILT_NODE: "true" |