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

Commit

Permalink
chore: release workflow: check contents of macos binary tarball (#22)
Browse files Browse the repository at this point in the history
`tar` is broken on macos... yeah I don't really know how that's possible either.
  • Loading branch information
ericswanson-dfinity authored Feb 28, 2022
1 parent f478258 commit b2f19cd
Showing 1 changed file with 74 additions and 13 deletions.
87 changes: 74 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,81 @@ jobs:
- name: Create tarball of binaries
run: tar -zcC ${{ matrix.binary_path }} -f binaries.tar.gz icx-proxy

- name: Upload tarball
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: binaries.tar.gz
asset_name: binaries-${{ matrix.name }}.tar.gz
tag: ${{ env.SHA_SHORT }}
- name: Inspect input binary and tarball contents
run: |
hexdump -C ${{ matrix.binary_path }}/icx-proxy | head
hexdump -C ${{ matrix.binary_path }}/icx-proxy | tail
${{ matrix.binary_path }}/icx-proxy --help
ARCHIVE="$(pwd)/binaries.tar.gz"
cd "$(mktemp -d)"
tar --version
tar -xzvf "$ARCHIVE"
ls -l icx-proxy
hexdump -C icx-proxy | head
hexdump -C icx-proxy | tail
./icx-proxy --help
- name: Upload deb
uses: svenstaro/upload-release-action@v2
- name: Upload tarball artifact
uses: actions/upload-artifact@v2
with:
name: tarball-${{ matrix.name }}
path: binaries.tar.gz
- name: Copy deb artifact
run: cp target/x86_64-unknown-linux-musl/debian/icx-proxy_${{ env.ICX_VERSION }}_amd64.deb icx-proxy.deb
if: contains(matrix.target, 'linux-musl')
- name: Upload deb artifact
uses: actions/upload-artifact@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/x86_64-unknown-linux-musl/debian/icx-proxy_${{ env.ICX_VERSION }}_amd64.deb
asset_name: icx-proxy.deb
tag: ${{ env.SHA_SHORT }}
name: deb-${{ matrix.name }}
path: icx-proxy.deb
if: contains(matrix.target, 'linux-musl')

upload:
runs-on: ${{ matrix.os }}
needs: [ build ]
strategy:
fail-fast: false
matrix:
rust: [ '1.55.0' ]
target: [ x86_64-apple-darwin, x86_64-unknown-linux-musl, x86_64-unknown-linux-gnu ]
include:
- os: macos-latest
target: x86_64-apple-darwin
name: macos
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
name: linux
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
name: linux-gnu
steps:
- name: Setup environment variables
run: echo "SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV

- name: Download tarball artifact
uses: actions/download-artifact@v2
with:
name: tarball-${{ matrix.name }}
- name: Download deb artifact
uses: actions/download-artifact@v2
with:
name: deb-${{ matrix.name }}
if: contains(matrix.target, 'linux-musl')

- name: Upload tarball
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: binaries.tar.gz
asset_name: binaries-${{ matrix.name }}.tar.gz
tag: ${{ env.SHA_SHORT }}

- name: Upload deb
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: icx-proxy.deb
tag: ${{ env.SHA_SHORT }}
if: contains(matrix.target, 'linux-musl')

0 comments on commit b2f19cd

Please sign in to comment.