Skip to content

Commit 0cf9930

Browse files
committed
fix build
1 parent 98817bd commit 0cf9930

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,40 @@ env:
1212

1313

1414
jobs:
15+
cross-compile:
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v3
19+
- name: Setup Go
20+
uses: actions/setup-go@v3
21+
with:
22+
go-version: "1.21"
23+
- name: Cache Go
24+
id: go-cache
25+
uses: actions/cache@v3
26+
with:
27+
path: |
28+
~/go/bin
29+
~/go/pkg/mod
30+
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
31+
- name: Install promu
32+
run: make promu
33+
shell: bash
34+
- name: Build
35+
run: ~/go/bin/promu -c .promu.yml crossbuild -v -p linux/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64
36+
- name: Upload Binaries
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: binaries
40+
path: .build/*
41+
include-hidden-files: true
42+
43+
1544
push_to_registries:
1645
name: Push Docker image to multiple registries
1746
runs-on: ubuntu-latest
47+
needs: [cross-compile]
48+
1849
permissions:
1950
attestations: write
2051
packages: write
@@ -32,6 +63,14 @@ jobs:
3263
- name: Set up Docker Buildx
3364
uses: docker/setup-buildx-action@v2
3465

66+
- name: Download Binaries
67+
uses: actions/download-artifact@v4
68+
with:
69+
name: binaries
70+
path: .build/
71+
include-hidden-files: true
72+
73+
- run: chmod +x .build/**/*
3574

3675
- name: Log in to the Container registry
3776
uses: docker/login-action@v3

0 commit comments

Comments
 (0)