Skip to content

Create Version PR

Create Version PR #110

---
name: Create Version PR
on:
workflow_dispatch:
inputs:
versionLevel:
description: 'The semVer level of the version'
required: true
default: 'minor'
type: choice
options:
- major
- minor
- patch
baseBranch:
description: 'Test CNAO branch to release from'
required: true
type: choice
default: 'main'
options:
- main
- release-0.76
- release-0.65
- release-0.58
- release-0.53
- release-0.79
- release-0.85
- release-0.89
- release-0.91
- release-0.93
jobs:
prepare-release:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.baseBranch }}
fetch-depth: 0
- name: Pull latest of latest branch
run: git pull --ff-only --rebase origin ${{ github.event.inputs.baseBranch }}
- name: Set author and email for version PR
run: |
git config --global user.email "[email protected]"
git config --global user.name "CNAO Version bot"
- name: Run make to prepare the PR
run: make prepare-${{ github.event.inputs.versionLevel }}
- name: Store release version
run: |
echo "RELEASE_VERSION=$(./hack/version.sh)" >> $GITHUB_ENV
- name: Create version PR
uses: peter-evans/create-pull-request@v3
with:
branch: rel-pr-${{ env.RELEASE_VERSION }}
token: ${{ secrets.KUBEVIRT_BOT_TOKEN }}
committer: GitHub <[email protected]>
signoff: true
commit-message: |
[${{ github.event.inputs.baseBranch }}] Release v${{ env.RELEASE_VERSION }}
Signed-off-by: GitHub <[email protected]>
title: "[${{ github.event.inputs.baseBranch }}] Release v${{ env.RELEASE_VERSION }}"
body: |
**What this PR does / why we need it**:
Release v${{ env.RELEASE_VERSION }}
```release-note
NONE
```