-
Notifications
You must be signed in to change notification settings - Fork 9
66 lines (54 loc) · 1.47 KB
/
create-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
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [arm64, amd64]
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
- name: Check out code
uses: actions/checkout@v4
- name: Get dependencies
run: go get -v -d ./...
- name: Build
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o vault-kv-search-${{ matrix.goos }}-${{ matrix.goarch }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vault-kv-search-${{ matrix.goos }}-${{ matrix.goarch }}
path: ./vault-kv-search-${{ matrix.goos }}-${{ matrix.goarch }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Prep binaries
run: |
mkdir tmp
mv vault-kv-search-*/* tmp
- name: Generate SHA256 Checksum
run: |
cd tmp
shasum -a 256 vault-kv-search-* > sha256sums.txt
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v2
with:
draft: false
prerelease: false
files: |
./tmp/sha256sums.txt
./tmp/vault-kv-search-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}