-
Notifications
You must be signed in to change notification settings - Fork 9
72 lines (57 loc) · 1.94 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
---
name: release
on:
release:
types:
- created
env:
GO_VERSION: "1.21"
jobs:
lint:
uses: ./.github/workflows/lint.yaml
test:
uses: ./.github/workflows/test.yaml
release:
needs:
- lint
- test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: install devspace
run: |
curl -L -o devspace \
"https://github.com/loft-sh/devspace/releases/download/${{ vars.DEVSPACE_VERSION}}/devspace-linux-amd64" &&
install -c -m 0755 devspace /usr/local/bin
working-directory: /tmp
- name: install helm
run: |
curl -L -o helm.tar.gz \
"https://get.helm.sh/helm-${{ vars.HELM_VERSION}}-linux-amd64.tar.gz"
tar -zxvf helm.tar.gz
mv linux-amd64/helm /usr/local/bin/helm
working-directory: /tmp
- name: login to ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push images
run: |
RELEASE_TAG=${{ github.ref_name }}
RELEASE_VERSION=${RELEASE_TAG#v}
devspace run build --profile release --var RELEASE_VERSION=$RELEASE_VERSION
- name: package and push charts
run: |
RELEASE_TAG=${{ github.ref_name }}
RELEASE_VERSION=${RELEASE_TAG#v}
helm registry login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
make set-chart-versions $RELEASE_VERSION
helm package charts/clicker --version $RELEASE_VERSION
helm push clicker-$RELEASE_VERSION.tgz oci://ghcr.io/srl-labs/clabernetes
helm package charts/clabernetes --version $RELEASE_VERSION
helm push clabernetes-$RELEASE_VERSION.tgz oci://ghcr.io/srl-labs/clabernetes