Skip to content

fix: match warpkit publish pattern — tag trigger, no provenance flag #3

fix: match warpkit publish pattern — tag trigger, no provenance flag

fix: match warpkit publish pattern — tag trigger, no provenance flag #3

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- 'v*'
permissions:
contents: read
id-token: write
jobs:
ci:
uses: ./.github/workflows/ci.yml
publish:
needs: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
cache: npm
- name: Install dependencies
run: npm ci
- name: Set version from tag
run: |
VERSION="${GITHUB_REF_NAME#v}"
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
node -e "
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
pkg.version = '$VERSION';
fs.writeFileSync('package.json', JSON.stringify(pkg, null, '\t') + '\n');
"
- name: Build
run: npm run build
- name: Publish
run: npm publish --access public