-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (46 loc) · 1.44 KB
/
goreleaser.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
name: goreleaser
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
module: [ p2p, oracle ] # bridge, external/geth
steps:
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: echo "flags=--snapshot" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Cache Modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
**/go.work.sum # Add this line to include go.work.sum in the cache path
key: ${{ runner.os }}-go-${{ hashFiles('**/go.work.sum') }}
restore-keys: ${{ runner.os }}-go-
- uses: actions/setup-go@v5
with:
go-version: 1.22
cache: true
# TODO(mrekucci): Re-enable when the repo is finalized.
# - name: GHCR Docker Login
# run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin
# - name: Setup Docker Buildx
# uses: docker/setup-buildx-action@v3
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean ${{ env.flags }} --config=./${{ matrix.module }}/.goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}