Skip to content

Commit d95667e

Browse files
committed
Add Github publish action
1 parent 4a0ae5f commit d95667e

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish packages on NPM
2+
on:
3+
# release:
4+
# types: [created]
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
12+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
13+
with:
14+
node-version: '18.x'
15+
- run: yarn config set npmAuthToken $NPM_PUBLISH_TOKEN
16+
env:
17+
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
18+
- run: yarn clean
19+
- run: yarn build-ci
20+
- run: yarn pack
21+
- run: npm publish

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "build/index.js",
66
"scripts": {
77
"build": "expo-module build",
8+
"build-ci": "expo-module prepublishOnly",
89
"clean": "expo-module clean",
910
"check-licenses": "node bin/check-licenses.js",
1011
"test": "expo-module test",

0 commit comments

Comments
 (0)