chore: bump version #3
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: Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: moonrepo/setup-rust@v1 | |
with: | |
bins: wasm-pack | |
cache-target: release | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: pnpm/action-setup@v4 | |
- name: Install deps | |
run: pnpm install | |
- name: Build | |
run: pnpm run build | |
publish: | |
needs: [build] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org | |
- name: Check if version has been updated | |
id: check | |
uses: EndBug/version-check@v2 | |
with: | |
diff-search: true | |
file-name: ./package.json | |
- uses: moonrepo/setup-rust@v1 | |
if: steps.check.outputs.changed == 'true' | |
with: | |
bins: wasm-pack | |
cache-target: release | |
- uses: pnpm/action-setup@v4 | |
if: steps.check.outputs.changed == 'true' | |
- name: Install deps | |
if: steps.check.outputs.changed == 'true' | |
run: pnpm install | |
- name: Build | |
if: steps.check.outputs.changed == 'true' | |
run: pnpm run build | |
- name: Publish | |
if: steps.check.outputs.changed == 'true' | |
run: pnpm publish --no-git-checks --access=public --tag latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }} |