Cherry-pick PRs for Milestone: test #27
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: "Main - PR Close" | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - closed | |
| workflow_dispatch: | |
| jobs: | |
| merge_pr: | |
| name: "PR Merged" | |
| if: github.event.pull_request.merged == true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GH_ORG_PAT }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| - name: Git config | |
| run: | | |
| git config --global user.email "${{ secrets.GH_ORG_EMAIL }}" | |
| git config --global user.name "${{ secrets.GH_ORG_NAME }}" | |
| - name: Apply version bump (major) | |
| if: contains(github.event.pull_request.labels.*.name, 'major') | |
| run: npm version major | |
| - name: Apply version bump (minor) | |
| if: contains(github.event.pull_request.labels.*.name, 'minor') | |
| run: npm version minor | |
| - name: Apply version bump (patch) | |
| if: contains(github.event.pull_request.labels.*.name, 'patch') | |
| run: npm version patch | |
| - name: Git push version bump | |
| run: git push origin main --follow-tags --force | |
| - name: Merge main -> develop | |
| run: | | |
| git fetch --unshallow | |
| git checkout develop | |
| git pull | |
| git merge origin/main -m "Auto-merge main back to dev" | |
| git push | |
| - id: set-version | |
| name: Output version change | |
| run: npm pkg get version |