Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/rust_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
20 changes: 19 additions & 1 deletion .github/workflows/rust_release_dry_run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Loading