-
Notifications
You must be signed in to change notification settings - Fork 16
61 lines (53 loc) · 1.63 KB
/
release_build.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
name: Release Build
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # Trigger this workflow when a new vX.Y.Z tag is pushed
env:
GO_VERSION: 1.20.3
jobs:
build:
name: Build Artifacts
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
steps:
- name: Setup go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Get dependencies
run: go mod download
- name: Test
run: go test -v ./...
- name: Build Artifacts
run: ./.github/workflows/scripts/build_artifacts.sh
- name: Upload Artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: release-artifacts
path: |
galadriel-*-linux-*-glibc.tar.gz
galadriel-*-linux-*-glibc.tar.gz.sha256sum.txt
release:
name: Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: release-artifacts
- name: Release
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4
with:
files: |
galadriel-*-linux-*-glibc.tar.gz
galadriel-*-linux-*-glibc.tar.gz.sha256sum.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}