Skip to content

Commit 53bdffe

Browse files
authored
chore: Update GitHub workflows for SDK release (#233)
1 parent 821e940 commit 53bdffe

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

.github/workflows/pull-request.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: "Build and Test"
22

33
on:
44
pull_request:
5-
push:
6-
workflow_call:
75
workflow_dispatch:
86

97
concurrency:

.github/workflows/release.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,27 @@ on:
44
workflow_dispatch
55

66
jobs:
7-
# SDK release is done from public/master branch.
8-
confirm-master-branch:
9-
name: Confirm release is run on public/master branch
7+
# SDK release is done from public/main branch.
8+
confirm-main-branch:
9+
name: Confirm release is run on public/main branch
1010
uses: mParticle/mparticle-workflows/.github/workflows/sdk-release-repo-branch-check.yml@main
1111

12-
# All new code is stored in internal/development. Release from public/master will merge changes from internal/development into
13-
# public/master, then run semantic-release on public/master to update changelog and release notes. Before semantic-release publishes
14-
# to npm, it builds the dist/ folder. Finally, commits from public/master are synced back to internal/master and internal/development.
12+
# All new code is stored in internal/development. Release from public/main will merge changes from internal/development into
13+
# public/main, then run semantic-release on public/main to update changelog and release notes. Before semantic-release publishes
14+
# to npm, it builds the dist/ folder. Finally, commits from public/main are synced back to internal/main and internal/development.
1515

1616
react-tests:
1717
name: Run React Native Unit Tests
1818
runs-on: ubuntu-latest
19-
needs: ['confirm-master-branch']
19+
needs: ['confirm-main-branch']
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v3
23-
- uses: actions/setup-node@master
24-
- uses: c-hive/gha-yarn-cache@v2
22+
uses: actions/checkout@v4
23+
- uses: actions/[email protected]
24+
with:
25+
node-version: 18
26+
cache: yarn
27+
cache-dependency-path: yarn.lock
2528

2629
- name: Install node modules
2730
run: yarn install
@@ -32,10 +35,10 @@ jobs:
3235
android-unit-tests:
3336
name: Run Android Unit Tests
3437
runs-on: ubuntu-latest
35-
needs: ['confirm-master-branch']
38+
needs: ['confirm-main-branch']
3639
steps:
3740
- name: Checkout
38-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
3942

4043
- name: Run Android Unit Tests
4144
run: echo "pwd"; pwd; echo "ls:"; ls; cd android; ./gradlew test
@@ -46,15 +49,18 @@ jobs:
4649
needs: ['android-unit-tests', 'react-tests']
4750
steps:
4851
- name: Checkout internal/development
49-
uses: actions/checkout@v3
52+
uses: actions/checkout@v4
5053

5154
- name: Setup Node.js
52-
uses: actions/setup-node@v3
55+
uses: actions/setup-node@v4.4.0
5356
with:
54-
node-version: 12.x
57+
node-version: 18
5558

5659
- name: Install node modules
5760
run: yarn install
5861

62+
- name: Build SDK
63+
run: yarn build
64+
5965
- name: Release
6066
run: ./release.sh ${{ secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)