From 8836ef026de84113a7a63812a56a356fa208b16f Mon Sep 17 00:00:00 2001 From: Akshay Date: Wed, 20 Nov 2024 14:03:21 +0000 Subject: [PATCH] Add uploads --- .github/workflows/workflow_macos.yml | 14 ++++++++++++++ .github/workflows/workflow_musl.yml | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.github/workflows/workflow_macos.yml b/.github/workflows/workflow_macos.yml index a1521df..1b0ea80 100644 --- a/.github/workflows/workflow_macos.yml +++ b/.github/workflows/workflow_macos.yml @@ -115,3 +115,17 @@ jobs: env: RUST_BACKTRACE: 1 run: cargo test --target x86_64-apple-darwin + + - name: Build Release + run: cargo build --release --target x86_64-apple-darwin + + - name: upx + run: | + wget https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-amd64_linux.tar.xz -O upx.txz + mkdir -p upx && tar -xvf upx.txz --strip-components=1 -C upx + sudo mv upx/upx /usr/local/bin/ + + - name: upload kalypso-cli + run: | + sudo upx kalypso-unified/target/x86_64-apple-darwin/release/kalypso-cli + AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --endpoint-url ${{secrets.AWS_S3_ENDPOINT}} kalypso-cli/target/x86_64-apple-darwin/release/kalypso-cli s3://artifacts/kalypso/binaries/kalypso-cli-macos diff --git a/.github/workflows/workflow_musl.yml b/.github/workflows/workflow_musl.yml index 6cff3b9..07a172d 100644 --- a/.github/workflows/workflow_musl.yml +++ b/.github/workflows/workflow_musl.yml @@ -121,3 +121,17 @@ jobs: env: RUST_BACKTRACE: 1 run: cargo test --target x86_64-unknown-linux-musl + + - name: Build Release + run: cargo build --release --target x86_64-unknown-linux-musl + + - name: upx + run: | + wget https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-amd64_linux.tar.xz -O upx.txz + mkdir -p upx && tar -xvf upx.txz --strip-components=1 -C upx + sudo mv upx/upx /usr/local/bin/ + + - name: upload kalypso-cli + run: | + sudo upx kalypso-unified/target/x86_64-unknown-linux-musl/release/kalypso-cli + AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --endpoint-url ${{secrets.AWS_S3_ENDPOINT}} kalypso-cli/target/x86_64-unknown-linux-musl/release/kalypso-cli s3://artifacts/kalypso/binaries/kalypso-cli-musl \ No newline at end of file