From 336817c4292c79c3fade18b0701feee760e9e4c0 Mon Sep 17 00:00:00 2001 From: Nathan Federknopp Date: Fri, 2 Jan 2026 15:19:19 -0800 Subject: [PATCH 1/2] add exclude flags to cargo publish --- .github/workflows/rust_release.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust_release.yaml b/.github/workflows/rust_release.yaml index e0d8c1a3a..effe4cee6 100644 --- a/.github/workflows/rust_release.yaml +++ b/.github/workflows/rust_release.yaml @@ -7,6 +7,10 @@ on: description: "Optional git tag or commit SHA to publish from" type: string required: false + exclude_crates: + description: "Optional comma-separated list of crates to exclude (e.g., 'sift_error,sift_connect')" + type: string + required: false jobs: rust-ci: @@ -27,7 +31,21 @@ jobs: ref: ${{ github.event.inputs.ref || github.sha }} - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable + - name: Build exclude flags + id: excludes + run: | + EXCLUDE_FLAGS="--exclude sift_stream_bindings --exclude sift_cli" + if [ -n "${{ inputs.exclude_crates }}" ]; then + IFS=',' read -ra CRATES <<< "${{ inputs.exclude_crates }}" + for crate in "${CRATES[@]}"; do + crate=$(echo "$crate" | xargs) + if [ -n "$crate" ]; then + EXCLUDE_FLAGS="$EXCLUDE_FLAGS --exclude $crate" + fi + done + fi + echo "flags=$EXCLUDE_FLAGS" >> $GITHUB_OUTPUT - name: Publish crates - run: cargo publish --workspace --exclude sift-stream-bindings --exclude sift_cli --manifest-path ./Cargo.toml --locked --token ${CARGO_REGISTRY_TOKEN} + run: cargo publish --workspace ${{ steps.excludes.outputs.flags }} --manifest-path ./Cargo.toml --locked --token ${CARGO_REGISTRY_TOKEN} env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} From 55171790426dea759a2d7049ebd3583536597db4 Mon Sep 17 00:00:00 2001 From: Nathan Federknopp Date: Fri, 2 Jan 2026 15:21:56 -0800 Subject: [PATCH 2/2] add to dry run --- .github/workflows/rust_release_dry_run.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust_release_dry_run.yaml b/.github/workflows/rust_release_dry_run.yaml index a498c45ad..afe8e3fbf 100644 --- a/.github/workflows/rust_release_dry_run.yaml +++ b/.github/workflows/rust_release_dry_run.yaml @@ -7,6 +7,10 @@ on: description: "Optional git tag or commit SHA to publish from" type: string required: false + exclude_crates: + description: "Optional comma-separated list of crates to exclude (e.g., 'sift_error,sift_connect')" + type: string + required: false jobs: rust-ci: @@ -27,5 +31,19 @@ jobs: ref: ${{ github.event.inputs.ref || github.sha }} - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable + - name: Build exclude flags + id: excludes + run: | + EXCLUDE_FLAGS="--exclude sift_stream_bindings --exclude sift_cli" + if [ -n "${{ inputs.exclude_crates }}" ]; then + IFS=',' read -ra CRATES <<< "${{ inputs.exclude_crates }}" + for crate in "${CRATES[@]}"; do + crate=$(echo "$crate" | xargs) + if [ -n "$crate" ]; then + EXCLUDE_FLAGS="$EXCLUDE_FLAGS --exclude $crate" + fi + done + fi + echo "flags=$EXCLUDE_FLAGS" >> $GITHUB_OUTPUT - name: Publish crates (dry run) - run: cargo publish --workspace --exclude sift-stream-bindings --exclude sift_cli --manifest-path ./Cargo.toml --locked --dry-run + run: cargo publish --workspace ${{ steps.excludes.outputs.flags }} --manifest-path ./Cargo.toml --locked --dry-run