Create CLI Release PR #19
This file contains 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 CLI Release PR | |
on: | |
workflow_dispatch: | |
inputs: | |
versionName: | |
description: 'Name of version (ie 23.9.5)' | |
required: true | |
jobs: | |
create-release-pr: | |
name: Create PR | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Import GPG key | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.RELEASER_GPG_PRIVATE_KEY }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_config_global: true | |
- name: Create release branch | |
run: git checkout -b release/${{ github.event.inputs.versionName }} | |
- name: Update version and push | |
id: make-commit | |
run: | | |
sed -i 's/version="[0-9]\.[0-9]\.[0-9]"/version="${{ github.event.inputs.versionName }}"/g' setup.py | |
git add setup.py | |
git commit -S --message "Prepare release ${{ github.event.inputs.versionName }}" | |
echo "commit=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | |
git push origin release/${{ github.event.inputs.versionName }} | |
- name: Create pull request into main | |
uses: thomaseizinger/[email protected] | |
with: | |
github_token: ${{ secrets.GH_RELEASE_TOKEN }} | |
head: release/${{ github.event.inputs.versionName }} | |
base: main | |
title: Release ${{ github.event.inputs.versionName }} | |
reviewers: ${{ github.event.issue.user.login }} | |
body: | | |
Release PR for ${{ github.event.inputs.versionName }} | |
I've updated the version name and committed: ${{ steps.make-commit.outputs.commit }}. |