name: Master
on:
  push:
    branches:
      - master

jobs:
  master:
    if: "! startsWith(github.event.head_commit.message, '[CI Skip]')"
    strategy:
      matrix:
        step: ['build:release']
    runs-on: ubuntu-latest
    env:
      YARN_ENABLE_SCRIPTS: false
      CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
      GH_PAT: ${{ secrets.GH_PAT_BOT }}
      GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT_BOT }}
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
        token: ${{ secrets.GH_PAT_BOT }}
    - uses: actions/setup-node@v4
      with:
        node-version: 'lts/*'
    - name: ${{ matrix.step }}
      run: |
        yarn install --immutable
        yarn ${{ matrix.step }}
