-
Notifications
You must be signed in to change notification settings - Fork 27
66 lines (53 loc) · 2.11 KB
/
release.yml
File metadata and controls
66 lines (53 loc) · 2.11 KB
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
60
61
62
63
64
65
66
name: Release SDK
on:
workflow_dispatch
jobs:
# SDK release is done from public/main branch.
confirm-main-branch:
name: Confirm release is run on public/main branch
uses: mParticle/mparticle-workflows/.github/workflows/sdk-release-repo-branch-check.yml@main
# All new code is stored in internal/development. Release from public/main will merge changes from internal/development into
# public/main, then run semantic-release on public/main to update changelog and release notes. Before semantic-release publishes
# to npm, it builds the dist/ folder. Finally, commits from public/main are synced back to internal/main and internal/development.
react-tests:
name: Run React Native Unit Tests
runs-on: ubuntu-latest
needs: ['confirm-main-branch']
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v6.1.0
with:
node-version: 18
cache: yarn
cache-dependency-path: yarn.lock
- name: Install node modules
run: yarn install
- name: Run test
run: yarn test
android-unit-tests:
name: Run Android Unit Tests
runs-on: ubuntu-latest
needs: ['confirm-main-branch']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Android Unit Tests
run: echo "pwd"; pwd; echo "ls:"; ls; cd android; ./gradlew test
release-and-sync-repos:
name: Release and Sync Repos
runs-on: ubuntu-latest
needs: ['android-unit-tests', 'react-tests']
steps:
- name: Checkout internal/development
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v6.1.0
with:
node-version: 18
- name: Install node modules
run: yarn install
- name: Build SDK
run: yarn build
- name: Release
run: ./release.sh ${{ secrets.NPM_TOKEN}}