Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cargo publish --dry-run job in release workflow #132

Merged
merged 1 commit into from
Nov 19, 2024
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
37 changes: 36 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,44 @@ jobs:
if-no-files-found: error
path: ./bin/

publish_dry_run:
name: publish (dry-run)
runs-on: ubuntu-24.04

steps:
- uses: actions/[email protected]

- name: Get Rust toolchain
id: toolchain
working-directory: .
run: |
awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' rust-toolchain >> "$GITHUB_OUTPUT"

- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ steps.toolchain.outputs.toolchain }}

- uses: Swatinem/[email protected]

- name: install cargo-about
run: |
cargo install --locked cargo-about --version ${{ env.CARGO_ABOUT_VERSION }}

- name: cargo publish (dry-run)
run: |
crates=("kble" "kble-socket" "kble-c2a" "kble-dump" "kble-eb90" "kble-serialport" "kble-tcp")
for c in "${crates[@]}" ; do
cargo publish --dry-run -p "${c}"

echo ""
# shellcheck disable=SC2086
ls -lh ./target/package/${c}-*/
done
ls -lh ./target/package

release:
name: Release
needs: [ build, build_kble_serialport_win ]
needs: [ build, build_kble_serialport_win, publish_dry_run ]
permissions:
contents: write

Expand Down