Skip to content

Commit 5d43a3f

Browse files
committed
chore: gh publish action
1 parent 529bdb7 commit 5d43a3f

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to NPM
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v2
23+
with:
24+
version: 8
25+
26+
- name: Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Build packages
30+
run: pnpm build
31+
32+
- name: Publish @h-codex/core
33+
run: cd packages/core && pnpm publish --access public
34+
env:
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
37+
- name: Publish @h-codex/mcp
38+
run: cd packages/mcp && pnpm publish --access public
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)