Skip to content

Commit ada5e6d

Browse files
authored
Merge pull request #70 from gatewayd-io/fix-build-pipeline
Fix build pipeline
2 parents 9bda57a + 24654d7 commit ada5e6d

File tree

2 files changed

+6
-57
lines changed

2 files changed

+6
-57
lines changed

.github/workflows/release.yaml

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ permissions:
99
contents: write
1010

1111
jobs:
12-
build:
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
matrix:
16-
os: [ubuntu-latest, macos-latest, windows-latest]
12+
build-and-release:
13+
runs-on: ubuntu-latest
1714
steps:
1815
- name: Checkout code
1916
uses: actions/checkout@v3
@@ -25,54 +22,10 @@ jobs:
2522
go-version: "1.20"
2623
cache: true
2724
- name: Install dependencies
28-
if: matrix.os == 'ubuntu-latest'
2925
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
3026
- name: Build and release binaries
31-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
32-
run: |
33-
if [ "$RUNNER_OS" == "Linux" ]; then
34-
make build-release-linux
35-
elif [ "$RUNNER_OS" == "macOS" ]; then
36-
make build-release-darwin
37-
fi
38-
- name: Build and release binaries
39-
if: matrix.os == 'windows-latest'
4027
run: |
41-
make build-release-windows
42-
- name: Upload binaries and checksums
43-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
44-
uses: actions/upload-artifact@v3
45-
with:
46-
path: dist/*.tar.gz
47-
name: dist-${{ matrix.os }}
48-
if-no-files-found: warn
49-
- name: Upload binaries and checksums
50-
if: matrix.os == 'windows-latest'
51-
uses: actions/upload-artifact@v3
52-
with:
53-
path: dist/*.zip
54-
name: dist-${{ matrix.os }}
55-
if-no-files-found: warn
56-
release:
57-
needs: build
58-
runs-on: ubuntu-latest
59-
steps:
60-
- name: Checkout code
61-
uses: actions/checkout@v3
62-
with:
63-
fetch-depth: 0
64-
- name: Download binaries and checksums for Windows
65-
uses: actions/download-artifact@v3
66-
with:
67-
name: dist-windows-latest
68-
- name: Download binaries and checksums for Linux
69-
uses: actions/download-artifact@v3
70-
with:
71-
name: dist-ubuntu-latest
72-
- name: Download binaries and checksums for macOS
73-
uses: actions/download-artifact@v3
74-
with:
75-
name: dist-macos-latest
28+
make build-release
7629
- name: Generate release checksums
7730
run: make generate-release-checksums
7831
- name: Create release and add artifacts

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,12 @@ build-windows-arm64:
7979
@zip -r dist/gatewayd-plugin-cache-windows-arm64-${VERSION}.zip -j ./dist/windows-arm64/
8080
@sha256sum dist/gatewayd-plugin-cache-windows-arm64-${VERSION}.zip | sed 's/dist\///g' >> dist/checksums.txt
8181

82-
build-release-linux: tidy create-build-dir build-linux-amd64 build-linux-arm64
83-
84-
build-release-darwin: tidy create-build-dir build-darwin-amd64 build-darwin-arm64
85-
86-
build-release-windows: tidy create-build-dir build-windows-amd64 build-windows-arm64
82+
build-release: tidy create-build-dir build-linux-amd64 build-linux-arm64 build-darwin-amd64 build-darwin-arm64 build-windows-amd64 build-windows-arm64
8783

8884
generate-release-checksums:
8985
@sha256sum gatewayd-plugin-cache-linux-amd64-${VERSION}.tar.gz > checksums.txt
9086
@sha256sum gatewayd-plugin-cache-linux-arm64-${VERSION}.tar.gz >> checksums.txt
9187
@sha256sum gatewayd-plugin-cache-darwin-amd64-${VERSION}.tar.gz >> checksums.txt
9288
@sha256sum gatewayd-plugin-cache-darwin-arm64-${VERSION}.tar.gz >> checksums.txt
93-
# @sha256sum gatewayd-plugin-cache-windows-amd64-${VERSION}.zip >> checksums.txt
94-
# @sha256sum gatewayd-plugin-cache-windows-arm64-${VERSION}.zip >> checksums.txt
89+
@sha256sum gatewayd-plugin-cache-windows-amd64-${VERSION}.zip >> checksums.txt
90+
@sha256sum gatewayd-plugin-cache-windows-arm64-${VERSION}.zip >> checksums.txt

0 commit comments

Comments
 (0)