From 26e06dc6c695e90aa164fef9a336bdda165becda Mon Sep 17 00:00:00 2001 From: Finlay Maguire Date: Tue, 21 May 2024 18:05:17 -0300 Subject: [PATCH] Try to fix release workflow --- .github/workflows/python_publish.yml | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python_publish.yml b/.github/workflows/python_publish.yml index 4f6085c..176d8de 100644 --- a/.github/workflows/python_publish.yml +++ b/.github/workflows/python_publish.yml @@ -3,21 +3,27 @@ name: python_publish -on: - release: - types: [created] - jobs: pypi-publish: - name: Upload release to PyPI + name: Publish release to PyPI runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/project/hAMRonization + url: https://pypi.org/p/hAMRonization permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write steps: - # retrieve your distributions here - - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + - name: Build package + run: | + python setup.py sdist bdist_wheel # Could also be python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1