From 3a42c2e48a58269ecea2abe262970cd37c4bde4b Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Sun, 20 Oct 2024 14:13:30 +0800 Subject: [PATCH] CI script --- .github/workflows/release.yml | 27 ++++++++++++++++----------- .github/workflows/stable.yml | 5 ++++- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7845a3b..0b843e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,24 +9,29 @@ jobs: create-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: taiki-e/create-gh-release-action@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + token: ${{ secrets.GITHUB_TOKEN }} upload-assets: + needs: create-release strategy: matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + - target: x86_64-apple-darwin + os: macos-latest + - target: x86_64-pc-windows-msvc + os: windows-latest runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: taiki-e/upload-rust-binary-action@v1 with: bin: cargo-sort - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_PROFILE_RELEASE_LTO: true + target: ${{ matrix.target }} + tar: unix + zip: windows + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index aea9d7c..3f1b7dc 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -11,7 +11,7 @@ jobs: name: Check strategy: matrix: - os: [ ubuntu-latest, windows-latest ] + os: [ ubuntu-latest, windows-latest, macos-latest ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -20,6 +20,9 @@ jobs: toolchain: stable profile: minimal override: true + - run: cargo check --all --all-targets --all-features + - run: cargo fmt --all -- --check + - run: cargo clippy --all-targets --all-features -- -D warnings - name: Run tests uses: actions-rs/cargo@v1 with: