feat(core): extraScopes monorepo bump parameter #104
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| issue_comment: | |
| types: [created, deleted] | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| name: Check if release job should run | |
| outputs: | |
| continue: ${{ steps.check.outputs.continue }} | |
| steps: | |
| - name: Check context | |
| id: check | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| function ifSetOptionsComment() { | |
| const { | |
| eventName, | |
| payload: { | |
| issue, | |
| comment | |
| } | |
| } = context | |
| const isPullRequest = issue?.pull_request | |
| const issueAuthor = issue?.user?.login | |
| const issueBody = issue?.body | |
| const issueState = issue?.state | |
| const commentBody = comment?.body | |
| if (eventName === 'issue_comment') { | |
| if (isPullRequest | |
| && issueAuthor === 'github-actions[bot]' | |
| && issueState === 'open' | |
| && issueBody?.includes('simple-release-pull-request: true') | |
| && commentBody?.includes('!simple-release/set-options') | |
| ) { | |
| const matches = issueBody.match(/simple-release-branch-to:\s*([^\s]+)/) | |
| if (matches) { | |
| return matches[1] | |
| } | |
| } | |
| return false // not a pull request comment, stop action | |
| } | |
| return null // continue | |
| } | |
| core.setOutput('continue', ifSetOptionsComment() !== false) | |
| release: | |
| runs-on: ubuntu-latest | |
| name: Release | |
| needs: check | |
| if: needs.check.outputs.continue == 'true' | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Simple release | |
| run: pnpm tsm --no-warnings ./packages/ci/src/action.ts | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |