forked from fission/fission
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (75 loc) · 2.33 KB
/
release.yaml
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
name: Create Draft release
on:
push:
tags:
- v1.**
- v2.**
env:
KIND_VERSION: v0.17.0
KIND_NODE_IMAGE_TAG: v1.19.16
jobs:
create-draft-release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
cache: true
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
install-only: true
- name: Kind Clutser
uses: engineerd/[email protected]
with:
image: kindest/node:${{ env.KIND_NODE_IMAGE_TAG }}
version: ${{ env.KIND_VERSION }}
config: kind.yaml
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to docker.io
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install Cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.12.0'
- name: Check cosign install!
run: cosign version
- name: Write cosign signing key to disk
run: 'echo "$KEY" > cosign.key'
shell: bash
env:
KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
- name: Generate yaml for manifest, Minikube and Openshift installation
run: ${GITHUB_WORKSPACE}/hack/build-yaml.sh $VERSION
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
shell: bash
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release
env:
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
GORELEASER_CURRENT_TAG: ${{ steps.get_version.outputs.VERSION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_CLI_EXPERIMENTAL: "enabled"
#ToDo - Verify and upload releases