Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit 0230bff

Browse files
fix: macOS build (#25)
`tar` is [broken](actions/runner-images#2619) on macOS. Use `gtar` instead.
1 parent b2f19cd commit 0230bff

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Release
22

3+
# We have to use gtar on macOS because apple's tar is literally broken.
4+
# Yes, I know how stupid that sounds. But it's true:
5+
# https://github.com/actions/virtual-environments/issues/2619
6+
37
on:
48
workflow_dispatch:
59
push:
@@ -19,14 +23,17 @@ jobs:
1923
target: x86_64-apple-darwin
2024
binary_path: target/release
2125
name: macos
26+
tar: gtar
2227
- os: ubuntu-latest
2328
target: x86_64-unknown-linux-musl
2429
binary_path: target/x86_64-unknown-linux-musl/release
2530
name: linux
31+
tar: tar
2632
- os: ubuntu-latest
2733
target: x86_64-unknown-linux-gnu
2834
binary_path: target/x86_64-unknown-linux-gnu/release
2935
name: linux-gnu
36+
tar: tar
3037
steps:
3138
- uses: actions/checkout@v2
3239

@@ -78,7 +85,7 @@ jobs:
7885
if: contains(matrix.os, 'macos')
7986

8087
- name: Create tarball of binaries
81-
run: tar -zcC ${{ matrix.binary_path }} -f binaries.tar.gz icx-proxy
88+
run: ${{ matrix.tar }} -zcC ${{ matrix.binary_path }} -f binaries.tar.gz icx-proxy
8289

8390
- name: Inspect input binary and tarball contents
8491
run: |
@@ -88,8 +95,8 @@ jobs:
8895
8996
ARCHIVE="$(pwd)/binaries.tar.gz"
9097
cd "$(mktemp -d)"
91-
tar --version
92-
tar -xzvf "$ARCHIVE"
98+
${{ matrix.tar }} --version
99+
${{ matrix.tar }} -xzvf "$ARCHIVE"
93100
ls -l icx-proxy
94101
hexdump -C icx-proxy | head
95102
hexdump -C icx-proxy | tail

0 commit comments

Comments
 (0)