mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
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:
1 parent
d874c752e8
commit
0cecd4b364
2 files changed
+23
-7
No files matched your search
@@ -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
@@ -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": {
|
||||
|
||||
Reference in new issue
Block a user