Prepare Release #1
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: Prepare Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'The version to prepare for release' | |
| required: true | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| prepare_release: | |
| name: Prepare Release v${{ github.event.inputs.version }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ssh-key: ${{ secrets.SSH_DEPLOY_KEY }} | |
| - uses: actions/setup-python@v6 | |
| with: | |
| cache: pip | |
| python-version: 3.x | |
| - name: Install dependencies | |
| run: pip install packaging | |
| - name: Prepare Git Variables | |
| run: | | |
| git config --global author.email ${{ github.actor }}@users.noreply.github.com | |
| git config --global author.name ${{ github.actor }} | |
| git config --global committer.email noreply@github.com | |
| git config --global committer.name GitHub | |
| - name: Set desired version | |
| run: | | |
| tools/set_version.py ${{ github.event.inputs.version }} > tmp_version | |
| echo "version=$(cat tmp_version)" >> $GITHUB_ENV | |
| - name: Commit desired version | |
| run: git commit -am "Bump to v${{ env.version }}" | |
| - name: Set development version | |
| run: | | |
| tools/set_version.py Unreleased > tmp_version | |
| echo "dev_version=$(cat tmp_version)" >> $GITHUB_ENV | |
| rm tmp_version | |
| - name: Commit development version | |
| run: git commit -am "Set development version v${{ env.dev_version }}" | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| body: | |
| branch: prepare_release_v${{ env.version }} | |
| draft: false | |
| title: Release v${{ env.version }} |