Skip to content

Commit 43f3fcd

Browse files
authored
backports github action for releasing the sdk (#19)
1 parent ed36526 commit 43f3fcd

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)