-
Notifications
You must be signed in to change notification settings - Fork 45
50 lines (41 loc) · 1.19 KB
/
build.yaml
File metadata and controls
50 lines (41 loc) · 1.19 KB
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
name: build
on:
push:
tags:
- "*"
workflow_dispatch:
permissions:
contents: write # For creating releases.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Get Go cache paths
id: go-cache-paths
shell: bash
run: |
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
- name: Go build cache
uses: actions/cache@v5
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-release-go-build-${{ hashFiles('**/go.sum') }}
- name: Go mod cache
uses: actions/cache@v5
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }}
- run: make build
- name: Generate checksums
run: |
cd bin
sha256sum * > code-marketplace_${{ github.ref_name }}_checksums.txt
- uses: softprops/action-gh-release@v2
with:
draft: true
files: ./bin/*