Create Release Tasks #3
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 Release Task | |
on: | |
workflow_dispatch: | |
inputs: | |
release_version: | |
description: "Release Version, e.g. v1.8.1" | |
required: true | |
release_captain: | |
description: "GitHub Username of the Release Captain, e.g. @<github-username>" | |
required: true | |
qa_captain: | |
description: "GitHub Username of the QA Captain, e.g. @<github-username>" | |
required: true | |
jobs: | |
create-release-task: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Parse version information | |
id: parse_version | |
run: | | |
RELEASE_VERSION="${{ github.event.inputs.release_version }}" | |
MAJOR_MINOR_VERSION=$(echo "$RELEASE_VERSION" | sed -E 's/(v[0-9]+\.[0-9]+)\.[0-9]+/\1.0/') | |
BBRANCH_NAME=$(echo "$RELEASE_VERSION" | sed -E 's/(v[0-9]+\.[0-9]+)\.[0-9]+/\1.x/') | |
echo "MAJOR_MINOR_VERSION=$MAJOR_MINOR_VERSION" >> $GITHUB_ENV | |
echo "BBRANCH_NAME=$BBRANCH_NAME" >> $GITHUB_ENV | |
- name: Create release task issue | |
uses: JasonEtco/create-an-issue@v2 | |
with: | |
filename: .github/ISSUE_TEMPLATE/release.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_VERSION: ${{ github.event.inputs.release_version }} | |
MAJOR_MINOR_VERSION: ${{ env.MAJOR_MINOR_VERSION }} | |
BBRANCH_NAME: ${{ env.BBRANCH_NAME }} | |
RELEASE_CAPTAIN: ${{ github.event.inputs.release_captain }} | |
QA_CAPTAIN: ${{ github.event.inputs.qa_captain }} |