From 839d2168ead4bb7b83e1fcb3b57eafeb4fd9825a Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Wed, 20 May 2026 05:26:41 -0400 Subject: [PATCH] .github/rust: fix publish url The URL configured for publishing to crates.io was incorrect; it depended on the `inputs.crates_repo` key to be present, which is only the case on `workflow_dispatch`, so it incorrectly selected the staging repository. Now checks correctly, allowing for missing `inputs` context. Signed-off-by: Nathan Perry Change-Id: Icf489ae9be0c6d7ec339dd1e4b1fb2c36a6a6964 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34ada165..706cb8dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,7 +185,7 @@ jobs: - uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe # v1.0.4 id: auth with: - url: ${{ case(inputs.crates_repo != 'prod', 'https://staging.crates.io', 'https://crates.io') }} + url: ${{ case(inputs.crates_repo == 'prod', 'https://crates.io', startsWith(github.ref, 'refs/tags/'), 'https://crates.io', 'https://staging.crates.io') }} - name: Setup rust id: setup-rust @@ -198,7 +198,7 @@ jobs: - *cargo_ws - name: Configure staging registry - if: inputs.crates_repo != 'prod' + if: inputs.crates_repo == 'staging' run: |- echo CARGO_REGISTRIES_STAGING_INDEX=https://staging.crates.io/index >> $GITHUB_ENV echo CARGO_REGISTRY_DEFAULT=staging >> $GITHUB_ENV