forked from helm/chart-testing
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.4 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
name: release
on:
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: shellcheck
uses: ludeeus/action-shellcheck@1.0.0
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Install tools
run: |
./setup.sh
- name: Lint
run: |
go vet -v ./...
goimports -w -l .
go mod tidy
git diff --exit-code
- name: Login to registry
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Tag
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
tag='${{ github.event.inputs.version }}'
git tag --annotate --message "Tag for release $tag" "$tag"
git push origin "refs/tags/$tag"
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o nounset
set -o pipefail
echo "Building release ${{ github.event.inputs.version }}"
./build.sh --release