Skip to content

Release Operator

Release Operator #8

Workflow file for this run

name: Release Operator
on:
workflow_dispatch:
inputs:
gitRef:
description: Commit SHA, tag or branch name
required: true
limitadorOperatorVersion:
description: Limitador Operator bundle version
default: latest
type: string
limitadorVersion:
description: Limitador service version
default: latest
type: string
prerelease:
description: Is the release a pre release?
required: false
type: boolean
jobs:
build:
name: Release operator
runs-on: ubuntu-latest
steps:
- name: Install gettext-base
run: |
sudo apt-get update
sudo apt-get install -y gettext-base
- name: Set up Go 1.21.x
uses: actions/setup-go@v4
with:
go-version: 1.21.x
id: go
- name: Checkout code at git ref
uses: actions/checkout@v3
with:
ref: ${{ inputs.gitRef }}
- name: Create release branch
if: ${{ !startsWith(inputs.gitRef, 'release-v') }}
run: |
git checkout -b release-v${{ inputs.limitadorOperatorVersion }}
- name: Prepare release
run: |
make prepare-release \
VERSION=${{ inputs.limitadorOperatorVersion }} \
LIMITADOR_VERSION=${{ inputs.limitadorVersion }}
- 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 add -A && git commit -s -m "Prepared release v${{ inputs.limitadorOperatorVersion }}"
git push origin release-v${{ inputs.limitadorOperatorVersion }}
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: v${{ inputs.limitadorOperatorVersion }}
tag_name: v${{ inputs.limitadorOperatorVersion }}
body: "**This release enables installations of Limitador v${{ inputs.limitadorVersion }}**"
generate_release_notes: true
target_commitish: release-v${{ inputs.limitadorOperatorVersion }}
prerelease: ${{ inputs.prerelease }}