Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: "Build and Test"

on:
pull_request:
push:
workflow_call:
workflow_dispatch:

concurrency:
Expand Down
36 changes: 21 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,27 @@ on:
workflow_dispatch

jobs:
# SDK release is done from public/master branch.
confirm-master-branch:
name: Confirm release is run on public/master branch
# 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/master will merge changes from internal/development into
# public/master, then run semantic-release on public/master to update changelog and release notes. Before semantic-release publishes
# to npm, it builds the dist/ folder. Finally, commits from public/master are synced back to internal/master and internal/development.
# 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-master-branch']
needs: ['confirm-main-branch']
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@master
- uses: c-hive/gha-yarn-cache@v2
uses: actions/checkout@v4
- uses: actions/setup-node@v4.4.0
with:
node-version: 18
cache: yarn
cache-dependency-path: yarn.lock

- name: Install node modules
run: yarn install
Expand All @@ -32,10 +35,10 @@ jobs:
android-unit-tests:
name: Run Android Unit Tests
runs-on: ubuntu-latest
needs: ['confirm-master-branch']
needs: ['confirm-main-branch']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4.4.0
with:
node-version: 12.x
node-version: 18

- name: Install node modules
run: yarn install

- name: Build SDK
run: yarn build

- name: Release
run: ./release.sh ${{ secrets.NPM_TOKEN}}