-
Notifications
You must be signed in to change notification settings - Fork 21
68 lines (66 loc) · 2.3 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 or branch name
required: true
operatorVersion:
description: Operator version
required: true
authorinoVersion:
description: Authorino version
required: true
default: latest
prerelease:
description: Is the release a prerelease
required: false
type: boolean
channels:
description: Bundle and catalog channels, comma separated
default: stable
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: ${{ github.event.inputs.gitRef }}
- name: Create release branch
if: ${{ !startsWith(github.event.inputs.gitRef, 'release-v') }}
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 }} \
CHANNELS=${{ github.event.inputs.channels }} \
DEFAULT_CHANNEL=stable \
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${{ github.event.inputs.operatorVersion }}"
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 }}
prerelease: ${{ github.event.inputs.prerelease }}