chore: version packages (#287) #137
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: Changesets | |
| on: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify: | |
| name: Verify | |
| uses: ./.github/workflows/verify.yml | |
| secrets: inherit | |
| changesets: | |
| name: Publish | |
| needs: verify | |
| # prevents this action from running on forks | |
| if: github.repository == 'wevm/abitype' | |
| permissions: | |
| contents: write # to create release (changesets/action) | |
| id-token: write # OpenID Connect token needed for provenance | |
| pull-requests: write # to create pull request (changesets/action) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 | |
| with: | |
| # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| uses: wevm/actions/.github/actions/pnpm@main | |
| with: | |
| node-version: 24.5 | |
| - name: PR or publish | |
| uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc | |
| with: | |
| title: 'chore: version packages' | |
| commit: 'chore: version packages' | |
| createGithubReleases: ${{ github.ref == 'refs/heads/main' }} | |
| publish: pnpm changeset:publish | |
| version: pnpm changeset:version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish prerelease | |
| run: | | |
| git reset --hard origin/main | |
| pnpm clean | |
| pnpm changeset:prepublish | |
| pnpx pkg-pr-new publish --pnpm --compact './packages/abitype' | |
| env: | |
| PKG_PR_NEW: true | |
| jsr: | |
| name: JSR | |
| needs: verify | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 | |
| - name: Install dependencies | |
| uses: wevm/actions/.github/actions/pnpm@main | |
| - name: Prepare | |
| run: pnpm node scripts/genJsrJson.ts && pnpm version:update && cd packages/abitype && cp ../../LICENSE LICENSE | |
| - name: Publish to JSR | |
| run: cd packages/abitype && pnpx jsr publish --allow-slow-types --allow-dirty |