diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index ad83e98..9ab4df8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -2,8 +2,6 @@ name: "Build and Test" on: pull_request: - push: - workflow_call: workflow_dispatch: concurrency: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dff0644..d3a6611 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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}} \ No newline at end of file