-
Notifications
You must be signed in to change notification settings - Fork 885
88 lines (88 loc) · 2.42 KB
/
release.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
on:
release:
types:
- published
name: Build Release
jobs:
release-assests:
name: release kubectl-karmada
runs-on: ubuntu-22.04
strategy:
matrix:
target:
- karmadactl
- kubectl-karmada
os:
- linux
- darwin
arch:
- amd64
- arm64
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Making and packaging
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: make release-${{ matrix.target }}
- name: Making helm charts
env:
VERSION: ${{ github.ref_name }}
run: make package-chart
- name: Uploading assets...
if: ${{ !env.ACT }}
uses: softprops/action-gh-release@v2
with:
files: |
_output/release/${{ matrix.target }}-${{ matrix.os }}-${{ matrix.arch }}.tgz
_output/release/${{ matrix.target }}-${{ matrix.os }}-${{ matrix.arch }}.tgz.sha256
release-crds-assests:
name: release crds
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Rename the crds directory
run: |
mv ./charts/karmada/_crds ./charts/karmada/crds
- name: Tar the crds
uses: a7ul/tar-action@v1.2.0
with:
command: c
cwd: ./charts/karmada/
files: crds
outPath: crds.tar.gz
- name: Uploading crd assets...
uses: softprops/action-gh-release@v2
with:
files: |
crds.tar.gz
release-charts:
name: Release charts
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Making helm charts
env:
VERSION: ${{ github.ref_name }}
run: make package-chart
- name: Uploading assets...
if: ${{ !env.ACT }}
uses: softprops/action-gh-release@v2
with:
files: |
_output/charts/karmada-chart-${{ github.ref_name }}.tgz
_output/charts/karmada-chart-${{ github.ref_name }}.tgz.sha256
_output/charts/karmada-operator-chart-${{ github.ref_name }}.tgz
_output/charts/karmada-operator-chart-${{ github.ref_name }}.tgz.sha256
update-krew-index:
needs: release-assests
name: Update krew-index
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Update new version in krew-index
uses: rajatjindal/krew-release-bot@v0.0.46