Skip to content

Commit 1cc3a8d

Browse files
authored
Pm 28544 fix publish rust crates (#601)
## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-28544 ## 📔 Objective This PR updates the cargo publishing workflow to use explicit package inclusion instead of exclusion-based logic. The workflow now explicitly lists the 14 crates from sdk-internal that sdk-sm depends on, preventing accidental publication of unintended crates. This script was pointed at `sdk-sm/Cargo.lock` to get the list of crates: ``` bash grep -B 2 'source = "git+https://github.com/bitwarden/sdk-internal.git' Cargo.lock | \ grep '^name = ' | \ cut -d'"' -f2 | \ sort ``` This PR also fixes an invalid license file reference in =bitwarden-commercial-vault/Cargo.toml= - changed from the non-existent `LICENSE_BITWARDEN.txt` to the correct `LICENSE_SDK.txt`. These changes have been bundled together because they are both small, and both support publishing the sdk crates for sm. ## 🚨 Breaking Changes <!-- Does this PR introduce any breaking changes? If so, please describe the impact and migration path for clients. If you're unsure, the automated TypeScript compatibility check will run when you open/update this PR and provide feedback. For breaking changes: 1. Describe what changed in the client interface 2. Explain why the change was necessary 3. Provide migration steps for client developers 4. Link to any paired client PRs if needed Otherwise, you can remove this section. --> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
1 parent a8a19d3 commit 1cc3a8d

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,25 @@ jobs:
121121
env:
122122
PUBLISH_GRACE_SLEEP: 10
123123
CARGO_REGISTRY_TOKEN: ${{ steps.retrieve-secrets.outputs.cratesio-api-token }}
124-
run: cargo-release release publish --exclude bw --exclude bws --execute --no-confirm
124+
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+
)
141+
PACKAGE_FLAGS=$(printf -- '-p %s ' "${PACKAGES[@]}")
142+
cargo-release release publish $PACKAGE_FLAGS --execute --no-confirm
125143
126144
- name: Update deployment status to Success
127145
if: ${{ inputs.release_type != 'Dry Run' && success() }}

bitwarden_license/bitwarden-commercial-vault/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rust-version.workspace = true
1111
readme.workspace = true
1212
homepage.workspace = true
1313
repository.workspace = true
14-
license-file = "../../LICENSE_BITWARDEN.txt"
14+
license-file = "../../LICENSE_SDK.txt"
1515
keywords.workspace = true
1616

1717
[features]

0 commit comments

Comments
 (0)