chore(deps): update pnpm/action-setup action to v6 #606
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 | |
| workflow_dispatch: | |
| inputs: | |
| stable: | |
| description: 'Release stable version' | |
| required: false | |
| default: false | |
| type: boolean | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| jobs: | |
| wait-for-checks: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: read | |
| steps: | |
| - name: Wait for CI checks | |
| uses: poseidon/wait-for-status-checks@v0.6.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| match_pattern: '^(commitlint|manypkg|eslint|tsc|prettier|test)$' | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: wait-for-checks | |
| name: release:${{ inputs.stable == true && 'stable' || 'snapshot' }} | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GIT_TOKEN }} | |
| - name: Set up project | |
| uses: ./.github/actions/setup | |
| - name: Build | |
| run: pnpm run build | |
| - name: Snapshot release | |
| if: inputs.stable == false | |
| # language=bash | |
| run: | | |
| pnpm changeset version --snapshot next | |
| pnpm run build | |
| pnpm changeset publish --tag next --no-git-tag | |
| - name: Stable release | |
| if: inputs.stable == true | |
| # language=bash | |
| run: | | |
| pnpm changeset version | |
| pnpm install | |
| pnpm run build | |
| pnpm changeset publish --no-git-tag | |
| - name: Commit changes | |
| if: inputs.stable == true | |
| # language=bash | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git diff-index --quiet HEAD || git commit -m "chore: release [skip ci]" | |
| - name: Create git tags | |
| if: inputs.stable == true | |
| # language=bash | |
| run: | | |
| pnpm changeset tag | |
| - name: Push changes | |
| if: inputs.stable == true | |
| # language=bash | |
| run: | | |
| git push origin main | |
| git push origin main --tags |