diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5845915..f9c6cb2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,9 +2,9 @@ name: Rust on: push: - branches: [ "master" ] + branches: ["master"] pull_request: - branches: [ "master" ] + branches: ["master"] env: CARGO_TERM_COLOR: always @@ -20,16 +20,25 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Run test - run: cargo test --verbose - - name: Run test release - run: cargo test --verbose --release + - uses: actions/checkout@v3 + - name: Run test + run: cargo test --verbose + - name: Run test release + run: cargo test --verbose --release test-no-default: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Run test - run: cargo test --verbose --no-default-features - - name: Run test release - run: cargo test --verbose --release --no-default-features + - uses: actions/checkout@v3 + - name: Run test + run: cargo test --verbose --no-default-features + - name: Run test release + run: cargo test --verbose --release --no-default-features + release: + runs-on: ubuntu-latest + needs: [test, test-no-default] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/')