From 5915922bd0a84706e323bb87384aa60623e38992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8Anio?= Date: Mon, 19 Sep 2022 18:26:40 -0300 Subject: [PATCH] Update python-publish.yml --- .github/workflows/python-publish.yml | 35 ++++++++-------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4649113..fd39091 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -20,43 +20,28 @@ jobs: runs-on: ubuntu-latest + name: Build and publish Python 🐍 distributions 📦 to PyPI + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v3 - - name: Set up Python + - uses: actions/checkout@master + - name: Set up Python 3.10 uses: actions/setup-python@v3 with: - python-version: '3.7' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - - name: Build package + python-version: '3.10' + - name: Install pypa/setuptools run: >- - python -m build - --sdist - --wheel - --outdir dist/ - . + python -m + pip install wheel - name: Extract tag name id: tag run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3) - - name: Update version in setup.py run: >- sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py - - name: Build a binary wheel run: >- python setup.py sdist bdist_wheel - - - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.TEST_PYPI_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_TOKEN }}