-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (48 loc) · 1.28 KB
/
build.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
name: Build
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- .github/**
- docs/**
- LICENSES/**
- README.md
- mkdocs.yaml
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
cache: true
- name: Create Helm Compose Distributions
run: make dist
- uses: actions/upload-artifact@v4
with:
name: helm-compose
path: release/*
- name: Publish release
if: "contains(github.event.head_commit.message, 'docs: release')"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG=$(git describe --abbrev=0)
for FILE in release/*.tgz; do
gh release upload ${TAG} ${FILE} --clobber
done
gh release edit ${TAG} --latest --prerelease=false