release(minor): 3.10.0 #2
Workflow file for this run
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: "auto-release" | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - main | |
| jobs: | |
| trigger-release: | |
| if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v') | |
| permissions: | |
| contents: write | |
| actions: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: verify PR was created by version-bump workflow | |
| uses: actions/github-script@v7 | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| PR_AUTHOR: ${{ github.event.pull_request.user.login }} | |
| with: | |
| script: | | |
| // Check if PR author is github-actions bot | |
| if (process.env.PR_AUTHOR !== 'github-actions[bot]') { | |
| core.setFailed(`Security check failed: PR was not created by github-actions bot (author: ${process.env.PR_AUTHOR})`) | |
| return | |
| } | |
| console.log('✅ All security checks passed') | |
| - name: trigger deploy workflow | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| await github.rest.actions.createWorkflowDispatch({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| workflow_id: 'deploy.yaml', | |
| ref: 'main' | |
| }) | |
| console.log(`Successfully triggered deploy workflow`) |