Skip to content

Commit 9edc2c7

Browse files
committed
ci: fix
1 parent 9a56e5f commit 9edc2c7

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ jobs:
2424

2525
- name: Build binaries
2626
run: |
27+
make clean
2728
make build BINARY_NAME=coldwire-server GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }}
2829
2930
- name: Upload artifacts
3031
uses: actions/upload-artifact@v4
3132
with:
32-
name: binaries
33+
# Use unique artifact name per OS/ARCH to avoid conflicts
34+
name: binaries-${{ matrix.goos }}-${{ matrix.goarch }}
3335
path: bin/*
3436

3537
release:
@@ -42,7 +44,7 @@ jobs:
4244
- name: Download build artifacts
4345
uses: actions/download-artifact@v4
4446
with:
45-
name: binaries
47+
name: binaries-*
4648
path: bin
4749

4850
- name: Compute SHA256 checksums
@@ -68,4 +70,3 @@ jobs:
6870
--notes "$LATEST_NOTES"
6971
env:
7072
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71-

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ BIN_DIR = bin
44
GOOS ?= $(shell go env GOOS)
55
GOARCH ?= $(shell go env GOARCH)
66

7-
.PHONY: build
7+
.PHONY: build clean
88

99
build:
1010
mkdir -p $(BIN_DIR)
11-
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(BIN_DIR)/$(BINARY_NAME)-$(GOOS)-$(GOARCH) ./cmd/server
1211

13-
go build -o $(BIN_DIR)/$(BINARY_NAME) ./cmd/server
12+
# this for ci
13+
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(BIN_DIR)/$(BINARY_NAME)-$(GOOS)-$(GOARCH) ./cmd/server
1414

15+
# this is for local builds
16+
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(BIN_DIR)/$(BINARY_NAME) ./cmd/server
1517

1618
clean:
1719
rm -rf $(BIN_DIR)

0 commit comments

Comments
 (0)