Skip to content
Merged
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
11 changes: 6 additions & 5 deletions .github/workflows/publish-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ jobs:
tool: toml-cli,cargo-semver-checks@0.42.0,cargo-release@0.25.18

- name: Check if crate has a lib target
shell: bash
id: has_lib
shell: bash
run: |
toml get "${{ inputs.package_path }}/Cargo.toml" lib.crate-type | grep lib
if [[ $? -eq 1 ]]; then
echo "has_lib=false" >> "$GITHUB_OUTPUT"
else
set +e # toml crashes the whole shell if it fails to find the key
result=$(toml get "${{ inputs.package_path }}/Cargo.toml" lib.crate-type)
if [[ "$result" == *"lib"* ]]; then
echo "has_lib=true" >> "$GITHUB_OUTPUT"
else
echo "has_lib=false" >> "$GITHUB_OUTPUT"
fi

- name: Set Git Author (required for cargo-release)
Expand Down