-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.25 KB
/
build.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
name: Build
on:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos:
- darwin
- windows
- linux
goarch:
- amd64
- arm64
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.23"
- name: Build
run: go build -o kubectl-cs cmd/kubectl-cs.go
- name: Package file
run: |
set +e
rm kubectl-cs.tar.gz &>/dev/null
set -e
tar czf kubectl-cs.tar.gz kubectl-cs LICENSE
- name: Release
uses: djnicholson/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-name: ${{ github.event.release.name }}
tag-name: ${{ github.event.release.tag_name }}
asset-name: kubectl-cs-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
file: kubectl-cs.tar.gz
update-krew:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Update new version in krew-index
uses: rajatjindal/[email protected]