Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release button #796

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Release Operator

on:
workflow_dispatch:
inputs:
gitRef:
description: Commit SHA, tag or branch name
required: true
kuadrantOperatorVersion:
description: Kuadrant Operator version
default: 0.0.0
type: string
authorinoOperatorVersion:
description: Authorino Operator bundle version
default: latest
type: string
limitadorOperatorVersion:
description: Limitador Operator bundle version
default: latest
type: string
dnsOperatorVersion:
description: DNS Operator bundle version
default: latest
type: string
wasmShimVersion:
description: WASM Shim version
default: latest
type: string
replacesVersion:
description: Kuadrant Operator replaced version
default: 0.0.0-alpha
type: string
channels:
description: Bundle and catalog channels, comma separated
default: preview
type: string

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.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.kuadrantOperatorVersion }}
- name: Prepare release
run: |
VERSION=${{ inputs.kuadrantOperatorVersion }} \
AUTHORINO_OPERATOR_VERSION=${{ inputs.authorinoOperatorVersion }} \
LIMITADOR_OPERATOR_VERSION=${{ inputs.limitadorOperatorVersion }} \
DNS_OPERATOR_VERSION=${{ inputs.dnsOperatorVersion }} \
WASM_SHIM_VERSION=${{ inputs.wasmShimVersion }} \
REPLACES_VERSION=${{ inputs.replacesVersion }} \
CHANNELS=${{ inputs.channels }}
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 add -A && git commit -m "Prepared release v${{ inputs.kuadrantOperatorVersion }}"
git push origin release-v${{ inputs.kuadrantOperatorVersion }}
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: v${{ inputs.kuadrantOperatorVersion }}
tag_name: v${{ inputs.kuadrantOperatorVersion }}
body: "**This release enables installations of Authorino Operator v${{ inputs.authorinoOperatorVersion }}, Limitador Operator v${{ inputs.limitadorOperatorVersion }}, DNS Operator v${{ inputs.dnsOperatorVersion }} and WASM Shim v${{ inputs.wasmShimVersion }}**"
generate_release_notes: true
target_commitish: release-v${{ github.event.inputs.operatorVersion }}
prerelease: ${{ github.event.inputs.prerelease }}
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,21 @@ bundle-build: ## Build the bundle image.
bundle-push: ## Push the bundle image.
$(MAKE) docker-push IMG=$(BUNDLE_IMG)

.PHONY: prepare-release
prepare-release: ## Prepare the manifests for OLM and Helm Chart for a release.
$(MAKE) bundle VERSION=$(VERSION) \
AUTHORINO_OPERATOR_VERSION=$(AUTHORINO_OPERATOR_VERSION) \
LIMITADOR_OPERATOR_VERSION=$(LIMITADOR_OPERATOR_VERSION) \
DNS_OPERATOR_VERSION=$(DNS_OPERATOR_VERSION) \
WASM_SHIM_VERSION=$(WASM_SHIM_VERSION) \
REPLACES_VERSION=$(REPLACES_VERSION) \
CHANNELS=$(CHANNELS)
$(MAKE) helm-build VERSION=$(VERSION) \
AUTHORINO_OPERATOR_VERSION=$(AUTHORINO_OPERATOR_VERSION) \
LIMITADOR_OPERATOR_VERSION=$(LIMITADOR_OPERATOR_VERSION) \
DNS_OPERATOR_VERSION=$(DNS_OPERATOR_VERSION) \
WASM_SHIM_VERSION=$(WASM_SHIM_VERSION)

##@ Code Style

GOLANGCI-LINT = $(PROJECT_PATH)/bin/golangci-lint
Expand Down
Loading