forked from open-telemetry/opentelemetry-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.63 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
name: "Create the release"
on:
push:
branches:
- 'release/**'
- 'main'
paths:
- 'versions.txt'
jobs:
get-versions:
runs-on: ubuntu-22.04
outputs:
current_version: ${{ steps.get-versions.outputs.current_version }}
desired_version: ${{ steps.get-versions.outputs.desired_version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Get versions from versions.txt"
id: get-versions
run: |
echo "desired_version=$(grep -v '#' versions.txt | grep operator= | awk -F= '{print $2}')" >> $GITHUB_OUTPUT
echo "current_version=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
release:
runs-on: ubuntu-22.04
needs: get-versions
if: needs.get-versions.outputs.desired_version != needs.get-versions.outputs.current_version
env:
CURRENT_VERSION: ${{ needs.get-versions.outputs.current_version }}
DESIRED_VERSION: ${{ needs.get-versions.outputs.desired_version }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "~1.21.1"
- name: "generate release resources"
run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator" VERSION=${DESIRED_VERSION}
- name: "create the release in GitHub"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./.ci/create-release-github.sh
- name: "refresh go proxy module info on release"
run: |
curl https://proxy.golang.org/github.com/open-telemetry/opentelemetry-operator/@v/${DESIRED_VERSION}.info