Skip to content

Commit

Permalink
add cargo publish --dry-run job in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sksat committed Nov 19, 2024
1 parent 87f3818 commit be821d2
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,40 @@ 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: Rename binaries
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

0 comments on commit be821d2

Please sign in to comment.