Skip to content

Commit 779b8ca

Browse files
committed
Add release workflow
1 parent 38353c0 commit 779b8ca

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

.changeset/config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"changelog": "@changesets/cli/changelog",
44
"commit": false,
55
"fixed": [],
6-
"linked": [],
6+
"linked": [
7+
["cmake-rn", "react-native-node-api"],
8+
["ferric-cli", "react-native-node-api"]
9+
],
710
"access": "restricted",
811
"baseBranch": "main",
912
"updateInternalDependencies": "patch",

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: lts/jod
19+
- run: npm ci
20+
21+
- name: Create Release Pull Request or Publish to npm
22+
id: changesets
23+
uses: changesets/action@v1
24+
with:
25+
publish: npm run release
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
"dev": "tsc --build --watch",
2020
"lint": "eslint .",
2121
"test": "npm run test --workspace react-native-node-api --workspace cmake-rn --workspace gyp-to-cmake --workspace node-addon-examples",
22-
"bootstrap": "npm run build && npm run bootstrap --workspaces --if-present"
22+
"bootstrap": "npm run build && npm run bootstrap --workspaces --if-present",
23+
"prerelease": "npm run build && npm run build-weak-node-api:all-triplets --workspace react-native-node-api",
24+
"release": "changeset publish"
2325
},
2426
"author": {
2527
"name": "Callstack",

0 commit comments

Comments
 (0)