From 4a5070169308ade5bebd2aaedeedf1a41310c2df Mon Sep 17 00:00:00 2001 From: vicanso Date: Sun, 13 Oct 2024 14:11:33 +0800 Subject: [PATCH] chore: update workflow --- .github/workflows/publish.yml | 40 +++++++++++++++++++++++------------ Makefile | 5 +++++ 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ec83dd1c..28e687d3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,21 +31,24 @@ jobs: cargo build --release --target=aarch64-apple-darwin mv target/aarch64-apple-darwin/release/pingap ./pingap-darwin-aarch64 tar -czvf pingap-darwin-aarch64.tar.gz pingap-darwin-aarch64 - ./.github/workflows/upload_asset.sh ./pingap-darwin-aarch64.tar.gz $GITHUB_TOKEN cargo build --release --target=aarch64-apple-darwin --features=tracking mv target/aarch64-apple-darwin/release/pingap ./pingap-sentry-darwin-aarch64 tar -czvf pingap-sentry-darwin-aarch64.tar.gz pingap-sentry-darwin-aarch64 - ./.github/workflows/upload_asset.sh ./pingap-sentry-darwin-aarch64.tar.gz $GITHUB_TOKEN cargo build --release --target=x86_64-apple-darwin mv target/x86_64-apple-darwin/release/pingap ./pingap-darwin-x86 tar -czvf pingap-darwin-x86.tar.gz pingap-darwin-x86 - ./.github/workflows/upload_asset.sh ./pingap-darwin-x86.tar.gz $GITHUB_TOKEN cargo build --release --target=x86_64-apple-darwin --features=tracking mv target/x86_64-apple-darwin/release/pingap ./pingap-sentry-darwin-x86 tar -czvf pingap-sentry-darwin-x86.tar.gz pingap-sentry-darwin-x86 + + ls -lh pingap*.gz + + ./.github/workflows/upload_asset.sh ./pingap-darwin-aarch64.tar.gz $GITHUB_TOKEN + ./.github/workflows/upload_asset.sh ./pingap-sentry-darwin-aarch64.tar.gz $GITHUB_TOKEN + ./.github/workflows/upload_asset.sh ./pingap-darwin-x86.tar.gz $GITHUB_TOKEN ./.github/workflows/upload_asset.sh ./pingap-sentry-darwin-x86.tar.gz $GITHUB_TOKEN linux-musl-x86: @@ -64,15 +67,18 @@ jobs: run: | apt-get update apt-get install protobuf-compiler -y - make release-all + make release-sentry + mv target/x86_64-unknown-linux-musl/release/pingap ./pingap-sentry-linux-musl-x86 + make release mv target/x86_64-unknown-linux-musl/release/pingap ./pingap-linux-musl-x86 - mv target/x86_64-unknown-linux-musl/release/pingap-sentry ./pingap-sentry-linux-musl-x86 - name: Upload Assets run: | tar -czvf pingap-linux-musl-x86.tar.gz pingap-linux-musl-x86 - ./.github/workflows/upload_asset.sh ./pingap-linux-musl-x86.tar.gz $GITHUB_TOKEN - tar -czvf pingap-sentry-linux-musl-x86.tar.gz pingap-sentry-linux-musl-x86 + + ls -lh pingap*.gz + + ./.github/workflows/upload_asset.sh ./pingap-linux-musl-x86.tar.gz $GITHUB_TOKEN ./.github/workflows/upload_asset.sh ./pingap-sentry-linux-musl-x86.tar.gz $GITHUB_TOKEN linux-musl-aarch64: @@ -91,15 +97,18 @@ jobs: run: | apt-get update apt-get install protobuf-compiler -y - make release-all + make release-sentry + mv target/aarch64-unknown-linux-musl/release/pingap ./pingap-sentry-linux-musl-aarch64 + make release mv target/aarch64-unknown-linux-musl/release/pingap ./pingap-linux-musl-aarch64 - mv target/aarch64-unknown-linux-musl/release/pingap-sentry ./pingap-sentry-linux-musl-aarch64 - name: Upload Assets run: | tar -czvf pingap-linux-musl-aarch64.tar.gz pingap-linux-musl-aarch64 - ./.github/workflows/upload_asset.sh ./pingap-linux-musl-aarch64.tar.gz $GITHUB_TOKEN - tar -czvf pingap-sentry-linux-musl-aarch64.tar.gz pingap-sentry-linux-musl-aarch64 + + ls -lh pingap*.gz + + ./.github/workflows/upload_asset.sh ./pingap-linux-musl-aarch64.tar.gz $GITHUB_TOKEN ./.github/workflows/upload_asset.sh ./pingap-sentry-linux-musl-aarch64.tar.gz $GITHUB_TOKEN linux-gnu-x86: @@ -126,9 +135,11 @@ jobs: - name: Upload Assets run: | tar -czvf pingap-linux-gnu-x86.tar.gz ./pingap-linux-gnu-x86 - ./.github/workflows/upload_asset.sh ./pingap-linux-gnu-x86.tar.gz $GITHUB_TOKEN - tar -czvf pingap-sentry-linux-gnu-x86.tar.gz ./pingap-sentry-linux-gnu-x86 + + ls -lh pingap*.gz + + ./.github/workflows/upload_asset.sh ./pingap-linux-gnu-x86.tar.gz $GITHUB_TOKEN ./.github/workflows/upload_asset.sh ./pingap-sentry-linux-gnu-x86.tar.gz $GITHUB_TOKEN linux-gnu-aarch64: runs-on: ubuntu-latest @@ -181,6 +192,9 @@ jobs: run: | cp /tmp/pingap/usr/local/bin/pingap ./pingap tar -czvf pingap-linux-gnu-aarch64.tar.gz ./pingap + + ls -lh pingap*.gz + ./.github/workflows/upload_asset.sh ./pingap-linux-gnu-aarch64.tar.gz $GITHUB_TOKEN docker: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 460706b9..772e427e 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,11 @@ release: cargo build --release ls -lh target/release +release-sentry: + cargo build --release --features=tracking + ls -lh target/release + + release-all: cargo build --release --features=tracking mv target/release/pingap target/release/pingap-sentry