ci: fix changesets pipeline #759
Workflow file for this run
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: Canary Release | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
| jobs: | ||
| canary: | ||
| name: Canary Release | ||
| runs-on: ubuntu-latest | ||
| # Prevent running this when the "Version Packages" PR merges (the stable release) | ||
| if: "!contains(github.event.head_commit.message, 'chore: version packages')" | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: ./.github/workflows/dependencies-install | ||
| with: | ||
| skip-browsers: 'true' | ||
| - name: Check for Changesets | ||
| id: check_changesets | ||
| run: | | ||
| # Run changeset status. If it succeeds (exit 0), we have changesets. | ||
| # If it fails (exit 1), we don't. | ||
| if pnpm changeset status; then | ||
| echo "has_changesets=true" >> $GITHUB_OUTPUT | ||
| echo "✅ Changesets found. Proceeding..." | ||
| else | ||
| echo "has_changesets=false" >> $GITHUB_OUTPUT | ||
| echo "⏭️ No changesets found. Skipping canary release." | ||
| fi | ||
| - name: Publish Canary | ||
| if: steps.check_changesets.outputs.has_changesets == 'true' | ||
| run: pnpm release-packages:canary | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||