From 1ac6218a748169530205fd8357201cdd860f2725 Mon Sep 17 00:00:00 2001 From: addisonbeck Date: Thu, 11 Dec 2025 15:00:49 -0500 Subject: [PATCH] ci(publish): add packages input for batched publishing - Add packages workflow input with space-separated package list - Replace hardcoded package array with input-driven array - Default to publishing all 14 crates (maintains existing behavior) - Enables manual override to batch publications and avoid rate limits Allows selective publishing when encountering crates.io rate limits by providing subset of packages to publish. --- .github/workflows/publish-rust-crates.yml | 24 ++++++++--------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish-rust-crates.yml b/.github/workflows/publish-rust-crates.yml index 37c8fa6e1..ed7a2f8a9 100644 --- a/.github/workflows/publish-rust-crates.yml +++ b/.github/workflows/publish-rust-crates.yml @@ -18,6 +18,11 @@ on: required: true type: string default: latest + packages: + description: "Space-separated list of packages to publish" + required: false + type: string + default: "bitwarden-api-api bitwarden-api-identity bitwarden-cli bitwarden-core bitwarden-crypto bitwarden-encoding bitwarden-error bitwarden-error-macro bitwarden-generators bitwarden-sm bitwarden-state bitwarden-threading bitwarden-uuid bitwarden-uuid-macro" jobs: setup: @@ -121,23 +126,10 @@ jobs: env: PUBLISH_GRACE_SLEEP: 10 CARGO_REGISTRY_TOKEN: ${{ steps.retrieve-secrets.outputs.cratesio-api-token }} + PACKAGES_INPUT: ${{ inputs.packages }} run: | - PACKAGES=( - bitwarden-api-api - bitwarden-api-identity - bitwarden-cli - bitwarden-core - bitwarden-crypto - bitwarden-encoding - bitwarden-error - bitwarden-error-macro - bitwarden-generators - bitwarden-sm - bitwarden-state - bitwarden-threading - bitwarden-uuid - bitwarden-uuid-macro - ) + # Convert space-separated string to array + IFS=' ' read -ra PACKAGES <<< "$PACKAGES_INPUT" PACKAGE_FLAGS=$(printf -- '-p %s ' "${PACKAGES[@]}") cargo-release release publish $PACKAGE_FLAGS --execute --no-confirm