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:
40
.gitea/workflows/publish-npm.yml
Normal file
40
.gitea/workflows/publish-npm.yml
Normal 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
|
||||
Reference in New Issue
Block a user