-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 1.74 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
---
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
issues: write
defaults:
run:
# Error handling and pipefile must be explicitly set via the default shell
# https://github.com/actions/runner/issues/353#issuecomment-1067227665
shell: bash --noprofile --norc -eo pipefail {0}
jobs:
goreleaser:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
# Setting fetch-depth to 0 here should fetch all of the history and
# all of the tags for the current branch and tag being released
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- name: Set up Helm
uses: azure/[email protected]
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Release with GoReleaser
id: releaser
uses: goreleaser/goreleaser-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
- name: Package the Helm Chart
run: |-
# helm package
helm package charts/dashboard \
--app-version ${GITHUB_REF#*/v} \
--version ${GITHUB_REF#*/v}
- name: Publish the Helm Chart
run: |-
# helm push
helm push \
dashboard-${GITHUB_REF#*/v}.tgz \
oci://ghcr.io/n3tuk/helm