Skip to content

Commit 2cd7eb0

Browse files
test: publish to npm registry workflow
1 parent 4f34661 commit 2cd7eb0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- publish-to-npm
7+
8+
jobs:
9+
publish:
10+
name: Publish Packages to npm
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: pnpm/action-setup@v4.0.0
16+
with:
17+
version: 6.32.2
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version-file: ".nvmrc"
21+
cache: "pnpm"
22+
- name: Install dependencies
23+
run: pnpm install
24+
25+
- name: Build packages
26+
run: pnpm run build --filter=./packages
27+
28+
- name: Create .npmrc for npm Registry
29+
run: |
30+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
31+
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
32+
33+
- name: Publish to npm Registry
34+
run: |
35+
pnpm publish --filter ./packages/framework
36+
pnpm publish --filter ./packages/runtime

0 commit comments

Comments
 (0)