From 5273251d41784e471ced7fd9bc87cc58fcf0353c Mon Sep 17 00:00:00 2001 From: Guillaume Lagrange Date: Tue, 25 Feb 2025 10:36:38 +0100 Subject: [PATCH 1/2] ci: build musl targets for cargo-codspeed binary artifacts --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2a6015f..737bdaee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,8 +44,8 @@ jobs: fail-fast: false matrix: include: - - target: x86_64-unknown-linux-gnu - - target: aarch64-unknown-linux-gnu + - target: x86_64-unknown-linux-musl + - target: aarch64-unknown-linux-musl cross: true runs-on: ubuntu-latest From 795aa74eee4ecc89620ec6c37b75009d6066080d Mon Sep 17 00:00:00 2001 From: Guillaume Lagrange Date: Tue, 25 Feb 2025 10:42:08 +0100 Subject: [PATCH 2/2] ci: allow dry run of release build --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 737bdaee..6c2c4460 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: tags: - "v*" + workflow_dispatch: permissions: contents: write @@ -23,11 +24,13 @@ jobs: - name: Build run: cargo build --release - name: Publish package + if: github.event_name != 'workflow_dispatch' run: cargo workspaces publish --from-git env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - name: Create a draft release id: create_release + if: github.event_name != 'workflow_dispatch' run: | NEW_VERSION=$(cargo workspaces ls --json | jq -r '.[] | select(.name == "codspeed") | .version') gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d @@ -58,6 +61,7 @@ jobs: - run: ${{ matrix.cross && 'cross' || 'cargo' }} build --locked --release --bin cargo-codspeed --target ${{ matrix.target }} - name: Upload Release Asset + if: github.event_name != 'workflow_dispatch' id: upload-release-asset uses: actions/upload-release-asset@v1 env: