forked from k8stopologyawareschedwg/deployer
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (69 loc) · 2.19 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
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
defaults:
run:
shell: bash
jobs:
release:
runs-on: ubuntu-20.04
steps:
- name: checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: setup golang
uses: actions/setup-go@v2
id: go
with:
go-version: 1.19
- name: verify modules
run: go mod verify
- name: set release version env var
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: build test binary
run: |
go version
make build-e2e
- name: build tool
run: |
go version
make
- name: render manifests
run: |
make release-manifests-k8s
- name: create K8S kind cluster
run: |
# kind is part of 20.04 image, see: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
kind version
# see image listing in https://github.com/kubernetes-sigs/kind/releases/tag/v0.11.1
kind create cluster --config=hack/kind-config-e2e-positive.yaml --image kindest/node:v1.24.7@sha256:577c630ce8e509131eab1aea12c022190978dd2f745aac5eb1fe65c0807eb315
kubectl label node kind-worker node-role.kubernetes.io/worker=''
- name: run E2E tests
run: |
_out/e2e.test -ginkgo.focus='\[PositiveFlow\]' -ginkgo.v
- name: fix build artifacts
run: |
hack/make-release-binaries.sh ${{ env.RELEASE_VERSION }}
- name: compute signature
run: |
hack/make-release-checksum.sh ${{ env.RELEASE_VERSION }}
- name: create release
uses: ncipollo/release-action@v1
with:
artifacts: "SHA256SUMS,deployer-v*-linux-amd64.gz,deployer-v*.yaml"
token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
- name: export kind logs
if: ${{ failure() }}
run: |
kind export logs /tmp/kind-logs
- name: archive kind logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: kind-logs
path: /tmp/kind-logs