Release PR (develop β master) #3
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 a source branch into the default branch. | |
| # | |
| # Usage: | |
| # - Triggered manually via workflow_dispatch. | |
| # - Creates a PR titled "Release: merge <source> into <default>". | |
| # - Adds the label "[bot] release" 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: | |
| workflow_dispatch: | |
| inputs: | |
| source_branch: | |
| description: 'Source branch to create PR from' | |
| required: false | |
| default: 'develop' | |
| type: string | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| env: | |
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
| SOURCE_BRANCH: ${{ inputs.source_branch || 'develop' }} | |
| # Opt into Node.js 24 for all JavaScript actions. | |
| # Remove once all referenced actions natively target Node 24. | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| create-pull-request: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout ${{ env.SOURCE_BRANCH }} branch | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ env.SOURCE_BRANCH }} | |
| - name: Setup easyscience[bot] | |
| id: bot | |
| uses: ./.github/actions/setup-easyscience-bot | |
| with: | |
| app-id: ${{ vars.EASYSCIENCE_APP_ID }} | |
| private-key: ${{ secrets.EASYSCIENCE_APP_KEY }} | |
| - name: Create PR from ${{ env.SOURCE_BRANCH }} to ${{ env.DEFAULT_BRANCH }} | |
| env: | |
| GH_TOKEN: ${{ steps.bot.outputs.token }} | |
| run: | | |
| gh pr create \ | |
| --base ${{ env.DEFAULT_BRANCH }} \ | |
| --head ${{ env.SOURCE_BRANCH }} \ | |
| --title "Release: merge ${{ env.SOURCE_BRANCH }} into ${{ env.DEFAULT_BRANCH }}" \ | |
| --label "[bot] release" \ | |
| --body "This PR is created automatically to trigger the release pipeline. It merges the accumulated changes from \`${{ env.SOURCE_BRANCH }}\` into \`${{ env.DEFAULT_BRANCH }}\`. | |
| β οΈ It is labeled \`[bot] release\` and is excluded from release notes and version bump logic." |