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 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