Skip to content

Merge pull request #7 from lloyal-ai/feat/ramp-down #20

Merge pull request #7 from lloyal-ai/feat/ramp-down

Merge pull request #7 from lloyal-ai/feat/ramp-down #20

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
skip_publish:
description: 'Skip npm publish (for testing)'
type: boolean
default: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- name: Verify dist outputs
run: |
test -f packages/sdk/dist/index.js
test -f packages/sdk/dist/index.d.ts
test -f packages/agents/dist/index.js
test -f packages/agents/dist/index.d.ts
test -f packages/rig/dist/index.js
test -f packages/rig/dist/index.d.ts
- name: Typecheck
run: npx tsc -b packages/sdk packages/agents packages/rig
- name: Publish packages
if: success() && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.skip_publish))
run: |
for pkg in packages/sdk packages/agents packages/rig; do
name=$(node -p "require('./$pkg/package.json').name")
version=$(node -p "require('./$pkg/package.json').version")
if npm view "$name@$version" version >/dev/null 2>&1; then
echo "⏭ $name@$version already published, skipping"
else
echo "Publishing $name@$version..."
npm publish --workspace "$pkg" --access public --provenance
fi
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}