From cf5b30015adee88170300f3272b892155ed384a5 Mon Sep 17 00:00:00 2001 From: Noah Knegt Date: Thu, 3 Jul 2025 23:40:41 +0200 Subject: [PATCH] build: Update release pipeline Signed-off-by: Noah Knegt --- .gitea/workflows/release-package.yaml | 41 +++++++-------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/.gitea/workflows/release-package.yaml b/.gitea/workflows/release-package.yaml index b9165c3..b89f740 100644 --- a/.gitea/workflows/release-package.yaml +++ b/.gitea/workflows/release-package.yaml @@ -15,53 +15,32 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - - # Cache cargo registry + # Cache cargo registry - name: Hash the lock file uses: https://gitea.com/seepine/hash-files@v1 id: get-hash with: patterns: | **/Cargo.lock - - name: Cache cargo registry - uses: actions/cache@v4 + + - name: Setup rust + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: cargo-${{ steps.get-hash.outputs.hash }} - restore-keys: | - cargo- - # Cache cargo registry - end + toolchain: stable + cache-shared-key: cargo-${{ steps.get-hash.outputs.hash }} + matcher: false - name: Build application - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --all-features --workspace --all-targets + run: cargo build --release --all-features --workspace --all-targets - name: Package application - uses: actions-rs/cargo@v1 - with: - command: package - args: --all-features --workspace --allow-dirty + ru8n: cargo package --all-features --workspace --allow-dirty - name: Add registry to cargo config run: echo -e '[registries.gitea]\nindex = "sparse+https://git.noahknegt.com/api/packages/${{ github.repository_owner }}/cargo/"\n' > ~/.cargo/config.toml - name: Publish to cargo registry - uses: actions-rs/cargo@v1 - with: - command: publish - args: --no-verify --registry gitea --token ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: cargo publish --no-verify --registry gitea --token ${{ secrets.CARGO_REGISTRY_TOKEN }} env: CARGO_NET_GIT_FETCH_WITH_CLI: true CARGO_NET_RETRY: 2