Skip to content

Commit 45fa9d8

Browse files
committed
chore: add pipeline to publish javascript api package
1 parent d564169 commit 45fa9d8

2 files changed

Lines changed: 46 additions & 1 deletion

File tree

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
run: pnpm install --frozen-lockfile
4747
working-directory: ./bindings/javascript
4848

49-
- name: Build demo pages
49+
- name: Build javascript api package
5050
run: pnpm build
5151
working-directory: ./bindings/javascript
5252

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Workflow for publishing javascirpt api package
2+
name: publish
3+
4+
on:
5+
workflow_dispatch:
6+
branches:
7+
- master
8+
9+
permissions:
10+
actions: read
11+
contents: write
12+
13+
jobs:
14+
ci:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: ./bindings/javascript
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: pnpm/action-setup@v2
26+
with:
27+
version: 9
28+
29+
# Cache node_modules
30+
- uses: actions/setup-node@v3
31+
with:
32+
node-version: 20
33+
cache: 'pnpm'
34+
registry-url: https://registry.npmjs.org
35+
36+
- name: Install dependencies
37+
run: pnpm install --frozen-lockfile
38+
39+
- name: Build javascript api package
40+
run: pnpm build
41+
42+
- name: Publish packages to npm
43+
run: pnpm publish
44+
env:
45+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)