Files
pi-perplexity/.github/workflows/npm-publish.yml
T
Ivan Pereira bbb5623f25 refactor(runtime): replace Bun dependency with Node fetch
Run Perplexity search and auth requests through pi's Node runtime instead of
shelling out to Bun. Move development and CI commands to npm, add a Node test
build path, and keep OTP auth fail-fast when Set-Cookie headers are not
available.
2026-06-23 15:51:16 +01:00

36 lines
889 B
YAML

name: Publish to npm
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
- name: Verify tag matches package.json version
run: node -e "const {version}=require('./package.json'); const tag=process.env.GITHUB_REF_NAME.replace(/^v/,''); if(version!==tag){console.error(\`Tag \${tag} does not match package.json version \${version}\`); process.exit(1);}"
- name: Upgrade npm
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci
- name: Publish
run: npm publish --provenance --access public