Version Packages (alpha) (#200) #148
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: | |
| - master | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify: | |
| name: Verify | |
| uses: ./.github/workflows/verify.yml | |
| secrets: inherit | |
| permissions: | |
| contents: read | |
| changesets: | |
| name: Changesets | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup workspace | |
| uses: ./.github/actions/setup-workspace | |
| - name: Create release PR or publish | |
| uses: changesets/action@v1 | |
| with: | |
| commit: 'chore: version package' | |
| title: 'chore: version package' | |
| version: pnpm changeset:version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| release: | |
| name: Release | |
| needs: verify | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup workspace | |
| uses: ./.github/actions/setup-workspace | |
| with: | |
| build-packages: true | |
| - name: Publish to NPM | |
| uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc | |
| with: | |
| createGithubReleases: ${{ github.ref == 'refs/heads/master' }} | |
| publish: pnpm changeset:publish | |
| version: pnpm changeset:version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |