codex-flows/.github/workflows/publish-codex-flows.yml
matamune 4c99fc0684
Some checks failed
ci / check (push) Failing after 18s
Document npm package bootstrap publishing
2026-05-13 13:42:04 +00:00

78 lines
2.4 KiB
YAML

name: Publish codex-flow packages
on:
workflow_dispatch:
inputs:
confirm_package:
description: "Type publish-codex-flow-packages to publish"
required: true
type: string
permissions:
contents: read
id-token: write
jobs:
publish:
if: inputs.confirm_package == 'publish-codex-flow-packages'
runs-on: ubuntu-latest
environment: npm-publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://registry.npmjs.org
- name: Update npm
run: npm install -g npm@^11.10.0
- name: Configure npm token
if: env.NPM_TOKEN != ''
run: npm config set //registry.npmjs.org/:_authToken "$NPM_TOKEN"
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Release check
run: bun run release:check
- name: Publish @peezy.tech/codex-flows
working-directory: packages/codex-client
run: |
version=$(node -p "require('./package.json').version")
if npm view "@peezy.tech/codex-flows@$version" version --json >/dev/null 2>&1; then
echo "@peezy.tech/codex-flows@$version is already published"
else
npm publish --access public --provenance
fi
- name: Publish @peezy.tech/flow-runtime
working-directory: packages/flow-runtime
run: |
version=$(node -p "require('./package.json').version")
if npm view "@peezy.tech/flow-runtime@$version" version --json >/dev/null 2>&1; then
echo "@peezy.tech/flow-runtime@$version is already published"
else
npm publish --access public --provenance
fi
- name: Publish @peezy.tech/flow-backend-convex
working-directory: packages/flow-backend-convex
run: |
version=$(node -p "require('./package.json').version")
if npm view "@peezy.tech/flow-backend-convex@$version" version --json >/dev/null 2>&1; then
echo "@peezy.tech/flow-backend-convex@$version is already published"
else
npm publish --access public --provenance
fi