From bc3419b0887126090e779026e4e6df01303cd16e Mon Sep 17 00:00:00 2001 From: crisog Date: Sat, 13 Jul 2024 02:54:30 +0200 Subject: [PATCH] build: unify build & release --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++------ .github/workflows/rust.yml | 22 ---------------------- 2 files changed, 26 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b93522..30310e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,36 @@ -name: Release +name: Rust Build and Release + +on: + push: + branches: ["main"] + paths-ignore: + - "README.md" + pull_request: + branches: ["main"] + paths-ignore: + - "README.md" + +env: + CARGO_TERM_COLOR: always permissions: pull-requests: write contents: write -on: - push: - branches: - - main - jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + release-plz: + needs: build name: Release-plz runs-on: ubuntu-latest steps: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 9fd45e0..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Rust - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose