-
Notifications
You must be signed in to change notification settings - Fork 71
48 lines (45 loc) · 1.37 KB
/
releaser.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
name: release
on:
push:
branches:
tags:
- 'v*'
pull_request:
jobs:
release:
strategy:
matrix:
# We can cross-compile from Linux to macOS and Windows. See .goreleaser.yaml
# So running just on ubuntu is sufficient.
go-version: [1.21.x]
os: [ubuntu-latest]
name: Release (${{ matrix.os}}, Go ${{ matrix.go-version }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
- shell: bash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- id: cache
uses: actions/cache@v3
with:
path: dist/${{ matrix.os }}
key: ${{ matrix.go }}-${{ env.sha_short }}
- name: Install Linux packages
run: sudo apt-get -y install libssl-dev
if: runner.os == 'Linux'
- name: Build all modules
run: go build -v ./... ./cmd/... ./launcher/... ./verifier/...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
if: success() && startsWith(github.ref, 'refs/tags/') && steps.cache.outputs.cache-hit != 'true'
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}