Version Bump PR #1
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: Version Bump PR | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| bump_type: | |
| description: 'Version Bump Type (major, minor, patch)' | |
| required: true | |
| default: 'minor' | |
| permissions: | |
| contents: write | |
| jobs: | |
| version_bump_pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| with: | |
| fetch-depth: 0 | |
| - name: Bump version | |
| id: bump_version | |
| run: | | |
| poetry version "${{ github.event.inputs.bump_type }}" | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v6 | |
| with: | |
| gpg_private_key: ${{ secrets.PANTHER_BOT_GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.PANTHER_BOT_GPG_PRIVATE_KEY_PASSPHRASE }} | |
| git_user_signingkey: true | |
| git_commit_gpgsign: true | |
| - name: Create Branch and Pull Request | |
| run: | | |
| NEW_VERSION="$(poetry version -s)" | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "panther-bot-automation" | |
| git checkout -b "$NEW_VERSION" | |
| git commit -a -S -m "Bump version to $NEW_VERSION" | |
| git push --set-upstream origin "$NEW_VERSION" | |
| gh pr create -t "Version bump to v$NEW_VERSION" -b "Bumping Version to v$NEW_VERSION ahead of release." | |
| env: | |
| GH_TOKEN: ${{ secrets.PANTHER_BOT_AUTOMATION_TOKEN }} |