From 0075bec3ae5cbcf69284bb6be8113cd8ee3db542 Mon Sep 17 00:00:00 2001 From: chenwj Date: Wed, 4 Sep 2024 13:53:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=94=B9action=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yml | 19 ++++++++++--------- Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index d993f5b..da2b514 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -12,9 +12,12 @@ jobs: - name: Setup Rust uses: https://git.airpig.cn/actions/setup-rust-toolchain@v1 - with: - cache: false - + + - name: Add target for musl + run: | + apt update && apt install -y musl-tools + rustup target add x86_64-unknown-linux-musl + - name: Cache cargo registry and build uses: https://gitea.com/actions/cache@v3 with: @@ -23,14 +26,13 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-registry- + ${{ runner.os }}-cargo- - - name: Build for musl + - name: Cargo build release for musl run: | - apt update && apt install -y musl-tools - rustup target add x86_64-unknown-linux-musl cargo build -r --target x86_64-unknown-linux-musl - name: Login to hub.airpig.cn @@ -42,7 +44,6 @@ jobs: - name: Build Docker image and push run: | - ls repo="sched_task" version=$(grep -E '^version' "Cargo.toml" | awk -F'"' '{print $2}') new_version="v${version}" diff --git a/Cargo.toml b/Cargo.toml index 714fde5..b1acbe8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sched_tasks_rs" -version = "1.1.4" +version = "1.1.5" edition = "2021" [dependencies]