chore(shared): publish @opencode-manager/shared to npm

Make the shared package public and publish it from the existing release workflow alongside ocm-cli so the mobile app can install it from npm instead of a pinned git commit.
This commit is contained in:
Chris Scott committed 2026-11-05 21:34:54 -05:00
1 parent d874c752e8
commit 0cecd4b364
2 files changed
+23 -7

No files matched your search

+10 -6
View File
@@ -1,4 +1,4 @@
name: Publish ocm-cli
name: Publish npm packages
on:
release:
@@ -11,8 +11,12 @@ permissions:
jobs:
publish:
name: Build and publish @opencode-manager/ocm-cli
name: Publish ${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: [ocm-cli, shared]
steps:
- name: Checkout
uses: actions/checkout@v6
@@ -39,7 +43,7 @@ jobs:
- name: Read package version
id: pkg
working-directory: ocm-cli
working-directory: ${{ matrix.package }}
run: |
VERSION=$(node -p "require('./package.json').version")
NAME=$(node -p "require('./package.json').name")
@@ -58,11 +62,11 @@ jobs:
fi
- name: Build
if: steps.check.outputs.already_published == 'false'
working-directory: ocm-cli
if: steps.check.outputs.already_published == 'false' && matrix.package == 'ocm-cli'
working-directory: ${{ matrix.package }}
run: bun scripts/build.ts
- name: Publish to npm
if: steps.check.outputs.already_published == 'false'
working-directory: ocm-cli
working-directory: ${{ matrix.package }}
run: pnpm publish --access public --no-git-checks
+13 -1
View File
@@ -1,8 +1,20 @@
{
"name": "@opencode-manager/shared",
"version": "1.1.0",
"description": "Shared schemas, types, OpenCode helpers and Manager API contracts for OpenCode Manager clients.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/chriswritescode-dev/opencode-manager.git",
"directory": "shared"
},
"type": "module",
"private": true,
"files": [
"src"
],
"publishConfig": {
"access": "public"
},
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {