-
Notifications
You must be signed in to change notification settings - Fork 30
78 lines (69 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
69
70
71
72
73
74
75
76
77
78
name: "Release"
on:
push:
branches:
- 'main'
paths:
- CHANGELOG.md
jobs:
release:
runs-on: ubuntu-22.04
outputs:
operator_version: ${{ steps.operator-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Determine operator version to release
id: operator-version
run: echo "version=$(grep -Eo '## [0-9]+\.[0-9]+\.[0-9]+' CHANGELOG.md | head -n 1 | awk '{print $2}')" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: "generate release resources"
run: make release-artifacts
env:
IMG_PREFIX: ghcr.io/${{ github.repository }}
- name: "create the release in GitHub"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPERATOR_VERSION: ${{ steps.operator-version.outputs.version }}
run: |
awk '/^## / {v=$2} v == "'${OPERATOR_VERSION}'" && !/^## / {print}' CHANGELOG.md > RELEASE_NOTES.md
gh release create \
-t "Release v${OPERATOR_VERSION}" \
-F RELEASE_NOTES.md \
"v${OPERATOR_VERSION}" \
'dist/tempo-operator.yaml#Installation manifest for Kubernetes' \
publish-images:
needs: release
uses: ./.github/workflows/reusable-publish-images.yaml
with:
publish_bundle: true
version_tag: v${{ needs.release.outputs.operator_version }}
push: true
operator-hub-prod-release:
needs: publish-images
uses: ./.github/workflows/reusable-operator-hub-release.yaml
with:
org: redhat-openshift-ecosystem
repo: community-operators-prod
branch: ${{ github.event.pull_request.head.ref }}
oprepo: ${{ github.repository }}
bundletype: openshift
secrets:
TEMPOOPERATORBOT_GITHUB_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }}
operator-hub-community-release:
needs: publish-images
uses: ./.github/workflows/reusable-operator-hub-release.yaml
with:
org: k8s-operatorhub
repo: community-operators
branch: ${{ github.event.pull_request.head.ref }}
oprepo: ${{ github.repository }}
bundletype: community
secrets:
TEMPOOPERATORBOT_GITHUB_TOKEN: ${{ secrets.TEMPOOPERATORBOT_GITHUB_TOKEN }}