From 0b8de57e3a9d071b21fbf5e7e328c2336b316c69 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Thu, 29 Jun 2023 08:33:34 -0400 Subject: [PATCH] misc workflow improvements (#247) - CI: add checks for build targets - adjust release script --- .github/workflows/rust.yml | 17 ++++++++++++++++- scripts/full-release.sh | 8 +++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8239ae4..cd49a67 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,7 +10,7 @@ env: CARGO_TERM_COLOR: always jobs: - build: + test: runs-on: ubuntu-latest steps: @@ -28,3 +28,18 @@ jobs: run: cargo doc --workspace --no-deps --all-features - name: Run tests run: cargo test --verbose + check: + runs-on: ubuntu-latest + strategy: + matrix: + target: [x86_64-unknown-linux-musl, x86_64-pc-windows-gnu] + steps: + - uses: actions/checkout@v3 + - name: Rust Cache + uses: Swatinem/rust-cache@v2.2.1 + - name: Install Cross + uses: baptiste0928/cargo-install@v1 + with: + crate: cross + - name: Check + run: cross check --verbose --all-targets --all-features --target ${{ matrix.target }} diff --git a/scripts/full-release.sh b/scripts/full-release.sh index b64d79c..6b70d5f 100755 --- a/scripts/full-release.sh +++ b/scripts/full-release.sh @@ -66,10 +66,10 @@ fi if [[ $SKIP_CRATE_PUBLISH == true ]]; then params+=(--no-publish) fi -cargo smart-release --update-crates-index --no-changelog "${params[@]}" +cargo smart-release --update-crates-index --no-changelog --no-publish "${params[@]}" -echo "Verify that the publish succeeded, and Press any key to continue..." -read -n 1 -s -r +#echo "Verify that the publish succeeded, and Press any key to continue..." +# read -n 1 -s -r if ! which cross; then echo "cross not found, installing..." @@ -98,3 +98,5 @@ if [[ $DRY_RUN == false ]]; then fi gh release create "$VERSION" --title "$VERSION" --draft "$BIN_PATH" "$BIN_PATH2" "./steamguard-cli_$RAW_VERSION-0.deb" fi + +echo "It's now safe to run cargo publish for the affected crates."