Create Release Branch #6
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: "Create Release Branch" | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| create-release-branch: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: "actions/checkout@v6" | |
| with: | |
| token: "${{ secrets.RELEASE_TOKEN }}" | |
| - name: "Set up Python" | |
| uses: "actions/setup-python@v6" | |
| with: | |
| python-version: "3.14" | |
| allow-prereleases: true | |
| - name: "Install uv" | |
| uses: "astral-sh/setup-uv@v7" | |
| with: | |
| enable-cache: true | |
| - name: "Setup git" | |
| run: | | |
| git config user.name pulpbot | |
| git config user.email pulp-infra@redhat.com | |
| - name: "Create Release Branch" | |
| run: | | |
| uv run --with bump-my-version~=0.20.0 .ci/scripts/create_release_branch.sh | |
| - name: "Create Pull Request" | |
| uses: "peter-evans/create-pull-request@v8" | |
| id: "create_pr" | |
| with: | |
| token: "${{ secrets.RELEASE_TOKEN }}" | |
| title: "Bump dev-version" | |
| body: "" | |
| branch: "bump_version" | |
| delete-branch: true | |
| - name: "Mark PR automerge" | |
| run: | | |
| gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}" | |
| if: "steps.create_pr.outputs.pull-request-number" | |
| env: | |
| GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}" | |
| continue-on-error: true | |
| - name: "Add Backport Label for new Branch" | |
| uses: "actions/github-script@v8" | |
| with: | |
| script: | | |
| const { NEW_BRANCH } = process.env; | |
| const labelName = "backport-" + NEW_BRANCH; | |
| await github.rest.issues.createLabel({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| name: labelName, | |
| color: "C8780A", | |
| }); | |
| ... |