-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (40 loc) · 1.22 KB
/
release-artifacts.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
on:
push:
tags:
- 'v*'
name: CLI and Manifests Release
jobs:
release:
name: Build and publish konfig binary
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Go 1.16
uses: actions/setup-go@v2.1.3
with:
go-version: 1.16
id: go
- name: Install upx
run: sudo apt-get install -y upx
- name: Get Version
shell: bash
run: |
echo ::set-output name=tag::$(echo ${GITHUB_REF##*/})
id: version
- name: Build CLI Release
run: |
make LDFLAGS="-s -w -X github.com/pelotech/jsonnet-controller/pkg/cmd.Version=${{ steps.version.outputs.tag }}" dist-konfig
cd dist && sha256sum * > konfig.sha256sum
- name: Generate Release Manifests
run: |
mkdir -p config/release
VERSION=${{ steps.version.outputs.tag }} BUNDLE_OUTPUT=config/release/jsonnet-controller.yaml make bundle
- name: Publish Artifacts
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_TOKEN }}
with:
files: |
dist/*
config/release/jsonnet-controller.yaml