-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (46 loc) · 1.16 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
push:
branches:
- master
# tags-ignore:
# - '**'
# paths:
# - 'android'
# - 'ios'
pull_request:
env:
NODE_VERSION: '18'
JAVA_VERSION: '17'
jobs:
test:
runs-on: macos-latest
name: Check
steps:
- uses: actions/checkout@v3
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- run: npm install
- run: npm run verify
- run: npm run prepublishOnly
publish:
name: Publish
runs-on: ubuntu-latest
needs: test
if: "startsWith(github.event.head_commit.message, 'chore(release): publish')"
steps:
- uses: actions/checkout@v3
- run: npm install
- name: Add NPM token
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
- name: Publish to NPM
run: npm publish --access public