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

Commit b2f19cd

Browse files
chore: release workflow: check contents of macos binary tarball (#22)
`tar` is broken on macos... yeah I don't really know how that's possible either.
1 parent f478258 commit b2f19cd

File tree

1 file changed

+74
-13
lines changed

1 file changed

+74
-13
lines changed

.github/workflows/release.yml

Lines changed: 74 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,81 @@ jobs:
8080
- name: Create tarball of binaries
8181
run: tar -zcC ${{ matrix.binary_path }} -f binaries.tar.gz icx-proxy
8282

83-
- name: Upload tarball
84-
uses: svenstaro/upload-release-action@v2
85-
with:
86-
repo_token: ${{ secrets.GITHUB_TOKEN }}
87-
file: binaries.tar.gz
88-
asset_name: binaries-${{ matrix.name }}.tar.gz
89-
tag: ${{ env.SHA_SHORT }}
83+
- name: Inspect input binary and tarball contents
84+
run: |
85+
hexdump -C ${{ matrix.binary_path }}/icx-proxy | head
86+
hexdump -C ${{ matrix.binary_path }}/icx-proxy | tail
87+
${{ matrix.binary_path }}/icx-proxy --help
88+
89+
ARCHIVE="$(pwd)/binaries.tar.gz"
90+
cd "$(mktemp -d)"
91+
tar --version
92+
tar -xzvf "$ARCHIVE"
93+
ls -l icx-proxy
94+
hexdump -C icx-proxy | head
95+
hexdump -C icx-proxy | tail
96+
./icx-proxy --help
9097
91-
- name: Upload deb
92-
uses: svenstaro/upload-release-action@v2
98+
- name: Upload tarball artifact
99+
uses: actions/upload-artifact@v2
100+
with:
101+
name: tarball-${{ matrix.name }}
102+
path: binaries.tar.gz
103+
- name: Copy deb artifact
104+
run: cp target/x86_64-unknown-linux-musl/debian/icx-proxy_${{ env.ICX_VERSION }}_amd64.deb icx-proxy.deb
105+
if: contains(matrix.target, 'linux-musl')
106+
- name: Upload deb artifact
107+
uses: actions/upload-artifact@v2
93108
with:
94-
repo_token: ${{ secrets.GITHUB_TOKEN }}
95-
file: target/x86_64-unknown-linux-musl/debian/icx-proxy_${{ env.ICX_VERSION }}_amd64.deb
96-
asset_name: icx-proxy.deb
97-
tag: ${{ env.SHA_SHORT }}
109+
name: deb-${{ matrix.name }}
110+
path: icx-proxy.deb
98111
if: contains(matrix.target, 'linux-musl')
99112

113+
upload:
114+
runs-on: ${{ matrix.os }}
115+
needs: [ build ]
116+
strategy:
117+
fail-fast: false
118+
matrix:
119+
rust: [ '1.55.0' ]
120+
target: [ x86_64-apple-darwin, x86_64-unknown-linux-musl, x86_64-unknown-linux-gnu ]
121+
include:
122+
- os: macos-latest
123+
target: x86_64-apple-darwin
124+
name: macos
125+
- os: ubuntu-latest
126+
target: x86_64-unknown-linux-musl
127+
name: linux
128+
- os: ubuntu-latest
129+
target: x86_64-unknown-linux-gnu
130+
name: linux-gnu
131+
steps:
132+
- name: Setup environment variables
133+
run: echo "SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
134+
135+
- name: Download tarball artifact
136+
uses: actions/download-artifact@v2
137+
with:
138+
name: tarball-${{ matrix.name }}
139+
- name: Download deb artifact
140+
uses: actions/download-artifact@v2
141+
with:
142+
name: deb-${{ matrix.name }}
143+
if: contains(matrix.target, 'linux-musl')
144+
145+
- name: Upload tarball
146+
uses: svenstaro/upload-release-action@v2
147+
with:
148+
repo_token: ${{ secrets.GITHUB_TOKEN }}
149+
file: binaries.tar.gz
150+
asset_name: binaries-${{ matrix.name }}.tar.gz
151+
tag: ${{ env.SHA_SHORT }}
152+
153+
- name: Upload deb
154+
uses: svenstaro/upload-release-action@v2
155+
with:
156+
repo_token: ${{ secrets.GITHUB_TOKEN }}
157+
file: icx-proxy.deb
158+
tag: ${{ env.SHA_SHORT }}
159+
if: contains(matrix.target, 'linux-musl')
160+

0 commit comments

Comments
 (0)