-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Adam Cattermole <[email protected]> Signed-off-by: Grzegorz Piotrowski <[email protected]>
- Loading branch information
1 parent
10f2e6c
commit 469ff92
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Release operator | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
commitSha: | ||
description: Commit SHA | ||
required: true | ||
operatorVersion: | ||
description: Operator version | ||
required: true | ||
authorinoVersion: | ||
description: Authorino version | ||
required: true | ||
default: latest | ||
|
||
jobs: | ||
build: | ||
name: Release operator | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Install gettext-base | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gettext-base | ||
- name: Set up Go 1.19.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19.x | ||
id: go | ||
- name: Checkout code at commit SHA | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.commitSha }} | ||
- name: Create release branch | ||
run: | | ||
git checkout -b release-v${{ github.event.inputs.operatorVersion }} | ||
- name: Prepare release | ||
run: VERSION=${{ github.event.inputs.operatorVersion }} AUTHORINO_VERSION=${{ github.event.inputs.authorinoVersion }} GH_TOKEN=${{ secrets.GITHUB_TOKEN }} make prepare-release | ||
- name: Commit and push | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git commit -m "Prepared release v${{ github.event.inputs.operatorVersion }}" -a | ||
git push origin release-v${{ github.event.inputs.operatorVersion }} | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: v${{ github.event.inputs.operatorVersion }} | ||
tag_name: v${{ github.event.inputs.operatorVersion }} | ||
body: "**This release enables installations of Authorino v${{ github.event.inputs.authorinoVersion }}**" | ||
generate_release_notes: true | ||
target_commitish: release-v${{ github.event.inputs.operatorVersion }} |