-
Notifications
You must be signed in to change notification settings - Fork 14
68 lines (66 loc) · 2.32 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release Operator
on:
workflow_dispatch:
inputs:
gitRef:
description: Commit SHA, tag or branch name
required: true
limitadorOperatorVersion:
description: Limitador Operator bundle version
default: 0.0.0
type: string
limitadorVersion:
description: Limitador service version
default: 0.0.0
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@v4
with:
ref: ${{ inputs.gitRef }}
token: ${{ secrets.KUADRANT_DEV_PAT }}
- 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
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Prepared release v${{ inputs.limitadorOperatorVersion }}"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
branch: release-v${{ inputs.limitadorOperatorVersion }}
create_branch: true
tagging_message: v${{ inputs.limitadorOperatorVersion }}
commit_options: '--signoff'
- 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 }}