Skip to content

Commit

Permalink
🔨 Add scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Endre Vegh committed Oct 19, 2023
1 parent f7d28cb commit 5d9138b
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
include:
- os: macos-latest
artifact_prefix: macos
target: x86_64-apple-darwin
target: aarch64-apple-darwin
binary_postfix: ""
- os: ubuntu-latest
artifact_prefix: linux
Expand Down Expand Up @@ -44,7 +44,29 @@ jobs:
sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
- name: Running cargo build
run: cargo build --release --all-features --target ${{ matrix.target }}
- uses: actions/upload-artifact@v3
- name: Packaging final binary
shell: bash
run: |
cd target/${{ matrix.target }}/release
BINARY_NAME=cnv${{ matrix.binary_postfix }}
strip $BINARY_NAME
RELEASE_NAME=cli-network-viewer-${{ matrix.artifact_prefix }}
tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
if [[ ${{ runner.os }} == 'Windows' ]]; then
certutil -hashfile $RELEASE_NAME.tar.gz sha256 | grep -E [A-Fa-f0-9]{64} > $RELEASE_NAME.sha256
else
shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256
fi
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: my-artifact
path: target/${{ matrix.target }}/release/cli-network-viewer-${{ matrix.artifact_prefix }}.tar.gz
- name: Upload sha
uses: actions/upload-artifact@v3
with:
name: my-artifact
path: LICENSE
path: target/${{ matrix.target }}/release/cli-network-viewer-${{ matrix.artifact_prefix }}.sha256

0 comments on commit 5d9138b

Please sign in to comment.