From 51f229a71cec0f24cb001e3065a005876015eb82 Mon Sep 17 00:00:00 2001 From: james <81617086+je-cook@users.noreply.github.com> Date: Fri, 1 Aug 2025 08:11:23 +0100 Subject: [PATCH 1/2] use fppf action for linting --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 433b3cf..9bb0096 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: python-version: "3.11" - name: Lint - run: hatch run lint:fmt + uses: Fusion-Power-Plant-Framework/fppf-actions/hatch-lint@main pytest: runs-on: ubuntu-latest From 2b4aba8db8c47b3391c063f98e126a2f8d0a89fe Mon Sep 17 00:00:00 2001 From: james <81617086+je-cook@users.noreply.github.com> Date: Fri, 1 Aug 2025 08:11:40 +0100 Subject: [PATCH 2/2] add publishing action --- .github/workflows/publish.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8495c2f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Publish + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + pypi: + runs-on: ubuntu-latest + + environment: release + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup python and Hatch + uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@main + - name: Build package + run: hatch build + - name: Run all tests with coverage + run: hatch run test:tests-cov + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1