chore: release v0.0.2-alpha.20 #22
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: release | |
| permissions: | |
| id-token: write | |
| contents: write | |
| actions: read | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - run: pnpm install | |
| - run: pnpm lint | |
| - run: pnpm prepack | |
| - run: pnpm test | |
| release: | |
| needs: ci | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: pnpm install | |
| - run: pnpm prepack | |
| - name: Determine npm tag | |
| id: npm-tag | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/v}" | |
| if [[ "$TAG" == *"-alpha"* ]]; then | |
| echo "tag=alpha" >> $GITHUB_OUTPUT | |
| elif [[ "$TAG" == *"-beta"* ]]; then | |
| echo "tag=beta" >> $GITHUB_OUTPUT | |
| elif [[ "$TAG" == *"-rc"* ]]; then | |
| echo "tag=rc" >> $GITHUB_OUTPUT | |
| else | |
| echo "tag=latest" >> $GITHUB_OUTPUT | |
| fi | |
| - name: GitHub Release | |
| run: pnpm dlx changelogithub | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to npm | |
| run: npm publish --provenance --access public --tag ${{ steps.npm-tag.outputs.tag }} |