Skip to content

Commit 1ac6218

Browse files
committed
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.
1 parent fc6d317 commit 1ac6218

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

.github/workflows/publish-rust-crates.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
required: true
1919
type: string
2020
default: latest
21+
packages:
22+
description: "Space-separated list of packages to publish"
23+
required: false
24+
type: string
25+
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"
2126

2227
jobs:
2328
setup:
@@ -121,23 +126,10 @@ jobs:
121126
env:
122127
PUBLISH_GRACE_SLEEP: 10
123128
CARGO_REGISTRY_TOKEN: ${{ steps.retrieve-secrets.outputs.cratesio-api-token }}
129+
PACKAGES_INPUT: ${{ inputs.packages }}
124130
run: |
125-
PACKAGES=(
126-
bitwarden-api-api
127-
bitwarden-api-identity
128-
bitwarden-cli
129-
bitwarden-core
130-
bitwarden-crypto
131-
bitwarden-encoding
132-
bitwarden-error
133-
bitwarden-error-macro
134-
bitwarden-generators
135-
bitwarden-sm
136-
bitwarden-state
137-
bitwarden-threading
138-
bitwarden-uuid
139-
bitwarden-uuid-macro
140-
)
131+
# Convert space-separated string to array
132+
IFS=' ' read -ra PACKAGES <<< "$PACKAGES_INPUT"
141133
PACKAGE_FLAGS=$(printf -- '-p %s ' "${PACKAGES[@]}")
142134
cargo-release release publish $PACKAGE_FLAGS --execute --no-confirm
143135

0 commit comments

Comments
 (0)