feat: add CI/CD workflows for npm and PyPI auto-publish on tag

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Vectry
2026-02-11 00:33:24 +00:00
parent f4185364d5
commit 9e6f6337c0
2 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
name: Publish npm packages
on:
push:
tags:
- "v*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version from tag
run: |
echo "VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//')" >> $GITHUB_ENV
- name: Configure npm auth
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Update package versions
run: |
cd packages/sdk-ts && npm version $VERSION --no-git-tag-version
cd ../opencode-plugin && npm version $VERSION --no-git-tag-version
- name: Publish agentlens-sdk
run: |
cd packages/sdk-ts
npm install
npm run build
npm publish --access public
- name: Publish opencode-agentlens
run: |
cd packages/opencode-plugin
npm install
npm run build
npm publish --access public