X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/b595f89212a015ba148fbdc0bdf284c7eebfe711..8794838fab08ff7b81b5a163eb1b92b65b3ea2dd:/.github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71f7c07..ab6669f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,32 +2,30 @@ # # SPDX-License-Identifier: Unlicense name: Release Actions - on: release: types: [published] - jobs: upload-pypi: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Check For pyproject.toml + - name: Check For setup.py id: need-pypi run: | - echo "pyproject-toml=$( find . -wholename './pyproject.toml' )" >> $GITHUB_OUTPUT + echo "setup-py=$( find . -wholename './setup.py' )" >> $GITHUB_OUTPUT - name: Set up Python - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.x' - name: Install dependencies - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') run: | python -m pip install --upgrade pip pip install --upgrade build twine - name: Build and publish - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') env: TWINE_USERNAME: ${{ secrets.pypi_username }} TWINE_PASSWORD: ${{ secrets.pypi_password }} @@ -36,4 +34,4 @@ jobs: sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file; done; python -m build - twine upload dist/* + twine upload dist/* \ No newline at end of file