File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 description : " Optional git tag or commit SHA to publish from"
88 type : string
99 required : false
10+ exclude_crates :
11+ description : " Optional comma-separated list of crates to exclude (e.g., 'sift_error,sift_connect')"
12+ type : string
13+ required : false
1014
1115jobs :
1216 rust-ci :
2731 ref : ${{ github.event.inputs.ref || github.sha }}
2832 - name : Install stable toolchain
2933 uses : dtolnay/rust-toolchain@stable
34+ - name : Build exclude flags
35+ id : excludes
36+ run : |
37+ EXCLUDE_FLAGS="--exclude sift_stream_bindings --exclude sift_cli"
38+ if [ -n "${{ inputs.exclude_crates }}" ]; then
39+ IFS=',' read -ra CRATES <<< "${{ inputs.exclude_crates }}"
40+ for crate in "${CRATES[@]}"; do
41+ crate=$(echo "$crate" | xargs)
42+ if [ -n "$crate" ]; then
43+ EXCLUDE_FLAGS="$EXCLUDE_FLAGS --exclude $crate"
44+ fi
45+ done
46+ fi
47+ echo "flags=$EXCLUDE_FLAGS" >> $GITHUB_OUTPUT
3048 - name : Publish crates
31- run : cargo publish --workspace --exclude sift-stream-bindings --exclude sift_cli --manifest-path ./Cargo.toml --locked --token ${CARGO_REGISTRY_TOKEN}
49+ run : cargo publish --workspace ${{ steps.excludes.outputs.flags }} --manifest-path ./Cargo.toml --locked --token ${CARGO_REGISTRY_TOKEN}
3250 env :
3351 CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
Original file line number Diff line number Diff line change 77 description : " Optional git tag or commit SHA to publish from"
88 type : string
99 required : false
10+ exclude_crates :
11+ description : " Optional comma-separated list of crates to exclude (e.g., 'sift_error,sift_connect')"
12+ type : string
13+ required : false
1014
1115jobs :
1216 rust-ci :
2731 ref : ${{ github.event.inputs.ref || github.sha }}
2832 - name : Install stable toolchain
2933 uses : dtolnay/rust-toolchain@stable
34+ - name : Build exclude flags
35+ id : excludes
36+ run : |
37+ EXCLUDE_FLAGS="--exclude sift_stream_bindings --exclude sift_cli"
38+ if [ -n "${{ inputs.exclude_crates }}" ]; then
39+ IFS=',' read -ra CRATES <<< "${{ inputs.exclude_crates }}"
40+ for crate in "${CRATES[@]}"; do
41+ crate=$(echo "$crate" | xargs)
42+ if [ -n "$crate" ]; then
43+ EXCLUDE_FLAGS="$EXCLUDE_FLAGS --exclude $crate"
44+ fi
45+ done
46+ fi
47+ echo "flags=$EXCLUDE_FLAGS" >> $GITHUB_OUTPUT
3048 - name : Publish crates (dry run)
31- run : cargo publish --workspace --exclude sift-stream-bindings --exclude sift_cli --manifest-path ./Cargo.toml --locked --dry-run
49+ run : cargo publish --workspace ${{ steps.excludes.outputs.flags }} --manifest-path ./Cargo.toml --locked --dry-run
You can’t perform that action at this time.
0 commit comments