diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..bc7ba42 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Publish to PyPI +on: + push: + paths: ["src/xpp/__init__.py", "pyproject.toml"] + + workflow_dispatch: + +permissions: + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/xpp + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e . hatch + - name: Build package + run: hatch build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1