From 9b493087be1d5ac395ebef5b62fffe1cb7853e91 Mon Sep 17 00:00:00 2001 From: Philippe Llerena Date: Sat, 24 Feb 2024 12:14:04 +0100 Subject: [PATCH 1/2] Add Ruff and Black workflows --- .github/workflows/build_and_release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index ded0e50..c2cf72a 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -6,8 +6,21 @@ on: - published jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Ruff + uses: chartboost/ruff-action@v1 + black: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Black + uses: psf/black@stable build_and_release: runs-on: ubuntu-latest + needs: [ruff, black] permissions: contents: read packages: write From 1e83012d24b10cd65629de479b58ff2bc06f0b7f Mon Sep 17 00:00:00 2001 From: Philippe Llerena Date: Sat, 24 Feb 2024 12:17:03 +0100 Subject: [PATCH 2/2] Update build_and_release workflow --- .github/workflows/build_and_release.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index c2cf72a..7888d43 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -1,9 +1,14 @@ -name: "build_and_release" +name: "test_build_and_release" on: + push: + branches: + - main + - master + pull_request: + workflow_dispatch: release: - types: - - published + types: [created] jobs: ruff: @@ -21,6 +26,7 @@ jobs: build_and_release: runs-on: ubuntu-latest needs: [ruff, black] + if: github.event_name == 'release' && github.event.action == 'created' permissions: contents: read packages: write