forked from anoop2811/kube-prompt
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.28 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
name: release
on:
push:
tags:
- v*.*.*
jobs:
release:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@master
- name: Build
env:
GO111MODULE: on
GOPATH: /home/runner/work/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export CREATE_EVENT_REF_TYPE=$(jq --raw-output .ref_type "$GITHUB_EVENT_PATH")
export TAGNAME=$(jq --raw-output .ref "$GITHUB_EVENT_PATH")
echo "========================================================="
echo "DEBUG:" $TAGNAME $CREATE_EVENT_REF_TYPE
echo "========================================================="
if [ "$CREATE_EVENT_REF_TYPE" != "tag" ]; then echo "ref_type is not a tag: ${CREATE_EVENT_REF_TYPE}" && exit 78; fi
make cross
echo "========================================================="
echo "DEBUG: ls pkg/"
ls pkg/
echo "========================================================="
go get -u github.com/tcnksm/ghr
$GOPATH/bin/ghr -n ${TAGNAME} -b "ʕ◔ϖ◔ʔ Release ${TAGNAME}" -draft ${TAGNAME} pkg/