From d2226054c593249205844614706b15c271668e76 Mon Sep 17 00:00:00 2001 From: iiPython Date: Wed, 20 Nov 2024 07:33:55 -0600 Subject: [PATCH] add publish workflow --- .github/workflows/publish.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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..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