Skip to content

Release SDK

Release SDK #18

Workflow file for this run

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/[email protected]
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/[email protected]
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}}