-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (49 loc) · 1.48 KB
/
releaser.yml
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
name: releaser
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
matrix:
module: [ bridge/standard/bridge-v1, external/geth, oracle, p2p ]
steps:
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: echo "FLAGS=--snapshot" >> ${GITHUB_ENV}
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.work.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
check-latest: true
cache-dependency-path: go.work.sum
# 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
- name: Release
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --config=./${{ matrix.module }}/.goreleaser.yml --clean ${{ env.FLAGS }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}