Publish to npm / publish (push) Successful in 37s
- .gitea/workflows/publish-npm.yml: npm ci + audit self-check + npm publish (NPM_PACKAGE_TOKEN secret) - package.json: files whitelist (src only), prepublishOnly gate, npm install support
31 lines
650 B
YAML
31 lines
650 B
YAML
name: Publish to npm
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Self-check (permission audit matrix)
|
|
run: node --experimental-strip-types --no-warnings src/audit.test.ts
|
|
|
|
- name: Publish
|
|
run: npm publish --access public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGE_TOKEN }}
|