misc workflow improvements (#247)

- CI: add checks for build targets
- adjust release script
This commit is contained in:
Carson McManus 2023-06-29 08:33:34 -04:00 committed by GitHub
parent 6af4374da3
commit 0b8de57e3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 4 deletions

View file

@ -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 }}

View file

@ -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."