fix(release): publish rc versions with rc dist-tag #82
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: Build Action Bundle | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'packages/core/src/**' | |
| - 'packages/shared/src/**' | |
| - 'packages/github/src/**' | |
| - 'scripts/build-action.mjs' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - uses: pnpm/action-setup@v6 | |
| - run: pnpm install --frozen-lockfile | |
| - name: Build action bundle | |
| id: build | |
| run: node scripts/build-action.mjs | |
| - name: Verify build output | |
| if: steps.build.outcome != 'success' | |
| run: | | |
| echo "::error::Build step failed — aborting before commit" | |
| exit 1 | |
| - name: Check for changes | |
| id: diff | |
| run: | | |
| git diff --quiet dist/action.js && echo "changed=false" >> "$GITHUB_OUTPUT" || echo "changed=true" >> "$GITHUB_OUTPUT" | |
| - name: Commit updated bundle | |
| if: steps.diff.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add dist/action.js | |
| git commit -m "chore: rebuild dist/action.js [skip ci]" | |
| git push |