fix: correct heading for changeset labels #63
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] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| cache: true | |
| - name: Check if release commit | |
| id: check | |
| run: | | |
| if git log -1 --pretty=%B | grep -q "^chore: release v"; then | |
| echo "is_release=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "is_release=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create release (on release commit) | |
| if: steps.check.outputs.is_release == 'true' | |
| run: deno run -A src/cli/main.ts release | |
| env: | |
| # Use PAT instead of GITHUB_TOKEN so the release event triggers other workflows | |
| GITHUB_TOKEN: ${{ secrets.PLS_RELEASE_TOKEN }} | |
| - name: Create/update release PR (on regular commit) | |
| if: steps.check.outputs.is_release == 'false' | |
| run: deno run -A src/cli/main.ts prep --execute | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PLS_RELEASE_TOKEN }} |