Skip to content

Commit 0c797ea

Browse files
committed
fix: CI workflow ARM64 verification and GoReleaser NFPM config
- Fix CI workflow to skip execution verification for ARM64 binaries (can't run on x86_64 runners) - Simplify GoReleaser NFPM configuration to use auto-detection with builds + bindir - This should resolve the release workflow NFPM path matching issue
1 parent f2f26d3 commit 0c797ea

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,34 @@ jobs:
9696

9797
- name: Verify binary
9898
run: |
99-
if [ "${{ matrix.goos }}" = "windows" ]; then
100-
./fontget-${{ matrix.goos }}-${{ matrix.goarch }}.exe version
99+
# Only verify binaries that match the runner's architecture
100+
# ARM64 binaries can't run on x86_64 runners, so we just verify they exist
101+
if [ "${{ matrix.goarch }}" = "arm64" ]; then
102+
# For ARM64, just verify the binary exists and has reasonable size
103+
if [ "${{ matrix.goos }}" = "windows" ]; then
104+
if [ -f "./fontget-${{ matrix.goos }}-${{ matrix.goarch }}.exe" ]; then
105+
ls -lh ./fontget-${{ matrix.goos }}-${{ matrix.goarch }}.exe
106+
echo "✓ ARM64 Windows binary created successfully"
107+
else
108+
echo "✗ ARM64 Windows binary not found"
109+
exit 1
110+
fi
111+
else
112+
if [ -f "./fontget-${{ matrix.goos }}-${{ matrix.goarch }}" ]; then
113+
ls -lh ./fontget-${{ matrix.goos }}-${{ matrix.goarch }}
114+
echo "✓ ARM64 ${{ matrix.goos }} binary created successfully"
115+
else
116+
echo "✗ ARM64 ${{ matrix.goos }} binary not found"
117+
exit 1
118+
fi
119+
fi
101120
else
102-
./fontget-${{ matrix.goos }}-${{ matrix.goarch }} version
121+
# For amd64, we can actually run the binary to verify it works
122+
if [ "${{ matrix.goos }}" = "windows" ]; then
123+
./fontget-${{ matrix.goos }}-${{ matrix.goarch }}.exe version
124+
else
125+
./fontget-${{ matrix.goos }}-${{ matrix.goarch }} version
126+
fi
103127
fi
104128
shell: bash
105129

.goreleaser.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ changelog:
5151
# Linux packages via NFPM (deb/rpm)
5252
nfpms:
5353
- id: linux-packages
54+
builds:
55+
- fontget
5456
package_name: fontget
5557
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}"
5658
formats:
@@ -63,9 +65,6 @@ nfpms:
6365
homepage: "https://github.com/Graphixa/FontGet"
6466
section: utils
6567
bindir: /usr/bin
66-
contents:
67-
- src: ./dist/fontget_{{ .Os }}_{{ .Arch }}/fontget-{{ .Os }}-{{ .Arch }}
68-
dst: /usr/bin/fontget
69-
file_info:
70-
mode: 0755
68+
# GoReleaser automatically filters to Linux builds and includes binaries from 'builds'
69+
# The binary will be placed in /usr/bin/fontget
7170

0 commit comments

Comments
 (0)