-
Notifications
You must be signed in to change notification settings - Fork 369
80 lines (62 loc) · 1.83 KB
/
ci.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
name: Kubernetes-sigs/krew CI
on:
push:
branches:
- '*'
tags:
- 'v*.*.*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go ${{ matrix.goVer }}
uses: actions/setup-go@v3
with:
go-version: '1.22'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: go mod download
- name: Install gox
run: hack/install-gox.sh
- name: Ensure go.mod is already tidied
run: go mod tidy && git diff --no-patch --exit-code
- name: Verify code patterns
run: hack/verify-code-patterns.sh
- name: Verify boilerplate
run: hack/verify-boilerplate.sh
- name: Run code lint
run: hack/run-lint.sh
- name: Run unit tests
run: go test -short ./...
- name: Make binaries && verify krew installation
run: hack/make-all.sh
- name: Ensure kubectl installed
run: hack/ensure-kubectl-installed.sh
- name: Verify installation
run: hack/verify-installation.sh
- name: Run integration tests
run: hack/run-integration-tests.sh
- name: Verify index migration from 0.3.x to 0.4.x
run: hack/verify-index-migration.sh
- name: Make release notes
if: contains(github.ref, 'tags')
run: |
echo 'RELEASE_NOTES<<EOF' >> $GITHUB_ENV
TAG=$GITHUB_REF_NAME hack/make-release-notes.sh >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Create a new release
if: contains(github.ref, 'tags')
id: create_release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
files: out/krew*
body: ${{ env.RELEASE_NOTES }}
fail_on_unmatched_files: true