-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (64 loc) · 1.84 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
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
permissions:
contents: write # required for creating GH release
id-token: write # required for reading vault secrets
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ${{ vars.PUBLIC_REGISTRY }}
username: ${{ secrets.PUBLIC_REGISTRY_USERNAME }}
password: ${{ secrets.PUBLIC_REGISTRY_PASSWORD }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name}}
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
- name: Verify
run: |
make verify
- name: Test
run: |
make test
- name: Go Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required for creating GH release
TAG: ${{ github.ref_name }}
COMMIT: ${{ github.sha }}
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean --verbose
- name: Image Push
run: |
make image-push
env:
TAG: ${{ github.ref_name }}
REPO: ${{ vars.PUBLIC_REGISTRY }}/${{ vars.PUBLIC_REGISTRY_REPO }}
- name: Upload Charts
env:
TAG: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required for updating GH release
run: |
make chart
for f in $(find dist/artifacts/ -name '*.tgz'); do
echo "Uploading $f to GitHub release $TAG"
gh release upload $TAG $f
done
echo "Charts successfully uploaded to GitHub release $TAG"