Skip to content

Commit

Permalink
Added release workflow
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Cattermole <[email protected]>
Signed-off-by: Grzegorz Piotrowski <[email protected]>
  • Loading branch information
grzpiotrowski and adam-cattermole committed Jul 19, 2023
1 parent 10f2e6c commit 469ff92
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/release.yaml
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 }}

0 comments on commit 469ff92

Please sign in to comment.