diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d7443bd1..67bd854e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,7 @@ # This workflow will upload a Python package using Twine when a release is # created. For more information see the following link: # https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + name: Publish to PyPI on: @@ -20,6 +21,21 @@ jobs: url: https://pypi.org/p/deepsensor steps: + - uses: actions/checkout@v3 + - 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 -U setuptools 'setuptools_scm[toml]' setuptools_scm_git_archive wheel twine + + - name: Build and publish + run: | + python setup.py sdist bdist_wheel + - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: