name: release on: push: branches: - master - main - next - alpha pull_request: branches: - master - main - next - alpha jobs: release: name: ๐Ÿš€ Release if: "!contains(github.event.head_commit.message, '[skip ci]') && !startsWith(github.event.head_commit.message, 'chore:') && !startsWith(github.event.head_commit.message, 'style:') && !contains(github.event.pull_request.title, '[skip ci]') && !startsWith(github.event.pull_request.title, 'chore:') && !startsWith(github.event.pull_request.title, 'style:') && !startsWith(github.event.head_commit.message, 'chore(') && !startsWith(github.event.head_commit.message, 'style(') && !startsWith(github.event.pull_request.title, 'chore(') && !startsWith(github.event.pull_request.title, 'style(')" runs-on: ubuntu-latest strategy: matrix: node-version: [20.x] steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 - name: Setup pnpm uses: pnpm/action-setup@v3 with: version: 9.0.6 - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: "pnpm" - name: Install run: pnpm install --reporter=silent - name: โœ… Check types run: pnpm check-types - name: ๐Ÿงน Lint run: pnpm lint --quiet - name: ๐Ÿงช Test run: pnpm run test --coverage --silent - name: Publish tests to Codecov if: always() uses: codecov/codecov-action@v2 with: directory: coverage verbose: false fail_ci_if_error: false - name: Build if: "github.event_name == 'push'" run: pnpm build - name: Stage changes if: "github.event_name == 'push'" run: git add . - name: ๐Ÿš€ Release if: "github.event_name == 'push'" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: pnpx semantic-release