Skip to content

chore(release): 0.4.0 #11

chore(release): 0.4.0

chore(release): 0.4.0 #11

Workflow file for this run

name: Publish Package
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
environment: Release
permissions:
id-token: write # Required for npm provenance
steps:
# 1. Checkout repository
- uses: actions/checkout@v4
# 2. Setup Node.js with npm registry
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
cache-dependency-path: server/package-lock.json
# 3. Install dependencies (server directory)
- name: Install dependencies
working-directory: ./server
run: |
# Clean install to handle platform-specific optional dependencies
rm -rf node_modules
npm install --prefer-offline
# 4. Run validation (prepublishOnly will run again, but be explicit)
- name: Run tests and checks
working-directory: ./server
run: |
npm run typecheck
npm run lint
npm run test
# 5. Build the package
- name: Build
working-directory: ./server
run: npm run build
# 6. Publish to npm (using granular access token with 2FA bypass)
- name: Publish to npm
working-directory: ./server
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}