From ac20bc3c01af31dfc8b789061c83837a4b2edd67 Mon Sep 17 00:00:00 2001 From: Hannes Kuchelmeister Date: Wed, 10 Jul 2024 23:51:23 +0200 Subject: [PATCH] update workflow files --- .github/workflows/linting.yml | 22 +++++++++++++++++++ .github/workflows/{ci.yml => pre-release.yml} | 19 +++------------- .github/workflows/release.yml | 2 +- 3 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/linting.yml rename .github/workflows/{ci.yml => pre-release.yml} (80%) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..4b2affc --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,22 @@ +on: + push: + pull_request: + +name: CI + +jobs: + rustfmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + lfs: true + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: rustfmt + - name: Create blank versions of configured file + run: echo -e "" >> src/config.rs + - name: Run cargo fmt + run: cargo fmt --all -- --check diff --git a/.github/workflows/ci.yml b/.github/workflows/pre-release.yml similarity index 80% rename from .github/workflows/ci.yml rename to .github/workflows/pre-release.yml index dbffc4d..355e9d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/pre-release.yml @@ -1,26 +1,12 @@ on: push: + branches: + - main pull_request: name: CI jobs: - rustfmt: - name: Rustfmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - lfs: true - - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - components: rustfmt - - name: Create blank versions of configured file - run: echo -e "" >> src/config.rs - - name: Run cargo fmt - run: cargo fmt --all -- --check - flatpak: name: Flatpak-prerelease runs-on: ubuntu-latest @@ -79,3 +65,4 @@ jobs: **/*.tar.gz **/*.sha256sum + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d936364..cb9f37f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: "tagged-release" on: push: tags: - - "v[0-9]+.0-9]+.0-9]+" + - "v*" jobs: flatpak: name: Flatpak