Skip to content

Commit

Permalink
Install hatch on build job
Browse files Browse the repository at this point in the history
  • Loading branch information
ecarrara committed Oct 2, 2024
1 parent 5cbaf99 commit 9627a99
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install hatch
run: |
python -m pip install hatch
run: python -m pip install hatch

- name: Lint (ruff check)
run: hatch run lint
Expand All @@ -34,16 +33,26 @@ jobs:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.12

- name: Install hatch
run: python -m pip install hatch

- name: Build
run: hatch build

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Release
name: Publish to PyPI
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [build]
Expand All @@ -62,9 +71,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
name: GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest
Expand Down Expand Up @@ -105,8 +112,8 @@ jobs:
--repo '${{ github.repository }}'
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs: [build]
name: Publish to TestPyPI
needs: [release]
runs-on: ubuntu-latest

environment:
Expand Down

0 comments on commit 9627a99

Please sign in to comment.