-
Notifications
You must be signed in to change notification settings - Fork 916
108 lines (108 loc) · 2.95 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
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/[email protected]
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
sbom-assests:
name: Release sbom
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Generate sbom for karmada file system
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
format: 'spdx'
output: 'sbom-karmada.spdx'
scan-ref: "/github/workspace/"
- name: Tar the sbom files
run: |
tar -zcf sbom.tar.gz *.spdx
- name: Uploading sbom assets...
uses: softprops/action-gh-release@v2
with:
files: |
sbom.tar.gz
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/[email protected]