CoreTextPlace/.github/workflows/publish_npm.yml
laosb 32534084df refactor: Migrate project from Deno to pnpm/Node
Replace Deno configs and workflows with pnpm/Node tooling Add
package.json, jsr.json, build.config.ts and pnpm-lock.yaml Remove
deno.json, deno.lock, Deno build scripts and workflow Move source files
into src/ and update imports and tests to vitest Add Test CI workflow
and adapt publish jobs for pnpm/node Update editor settings, tasks,
.gitignore and bump LICENSE year
2025-11-29 19:11:49 +08:00

26 lines
653 B
YAML

name: Publish Package to npmjs
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: pnpm/action-setup@v4
with:
run_install: false
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: "24.x"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
- run: pnpm install
- run: pnpm build
- run: pnpm test
- run: pnpm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}