Release PR (develop -> master) #8
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
| # This workflow creates an automated release PR from `develop` into `main`. | |
| # | |
| # Usage: | |
| # - Triggered manually via workflow_dispatch. | |
| # - Creates a PR titled "Release: merge develop into master". | |
| # - Adds the label "[maintainer] auto-pull-request" so it is excluded from changelogs. | |
| # - The PR body makes clear that this is automation only (no review needed). | |
| name: Release PR (develop -> master) | |
| on: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| # Set the environment variables to be used in all jobs defined in this workflow | |
| env: | |
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
| jobs: | |
| create-pull-request: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout develop branch | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: develop | |
| - name: Create PR from develop to ${{ env.DEFAULT_BRANCH }} | |
| run: | | |
| gh pr create \ | |
| --base ${{ env.DEFAULT_BRANCH }} \ | |
| --head develop \ | |
| --title "Release: merge develop into ${{ env.DEFAULT_BRANCH }}" \ | |
| --label "[maintainer] auto-pull-request" \ | |
| --body "⚠️ This PR is created automatically to trigger the release pipeline. It merges the accumulated changes from \`develop\` into \`${{ env.DEFAULT_BRANCH }}\`. | |
| It is labeled \`[maintainer] auto-pull-request\` and is excluded from release notes and version bump logic." | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_API_PERSONAL_ACCESS_TOKEN }} |