fix: trigger ci #11
This file contains 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 & Publish | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
id-token: write | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | |
release-type: node | |
# The following steps will only run if a release was created | |
- uses: actions/checkout@v4 | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: pnpm/action-setup@v2 | |
if: ${{ steps.release.outputs.release_created }} | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
if: ${{ steps.release.outputs.release_created }} | |
with: | |
node-version: '20' | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'pnpm' | |
- name: Install dependencies | |
if: ${{ steps.release.outputs.release_created }} | |
run: pnpm install --frozen-lockfile | |
- name: Verify & build | |
if: ${{ steps.release.outputs.release_created }} | |
run: pnpm verify | |
- name: Publish to NPM | |
if: ${{ steps.release.outputs.release_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: pnpm publish --no-git-checks --provenance --access public | |
- name: Update JSR version | |
if: ${{ steps.release.outputs.release_created }} | |
run: | | |
VERSION=$(node -p "require('./package.json').version") | |
jq --arg v "$VERSION" '.version = $v' jsr.json > temp.json && mv temp.json jsr.json | |
- name: Publish to JSR | |
if: ${{ steps.release.outputs.release_created }} | |
run: pnpx jsr publish |