X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/03548b64a8d7b407b4ae6464c5ffc551be8fc0be..5ff566c864a4ce65feda222ec35f4dea9a4089e1:/.github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9aa3d4c..a0eb8f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,29 +11,29 @@ jobs: upload-pypi: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Check For setup.py id: need-pypi run: | - echo ::set-output name=setup-py::$( find . -wholename './setup.py' ) + echo "setup-py=$( find . -wholename './setup.py' )" >> $GITHUB_OUTPUT - name: Set up Python if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install --upgrade build twine - name: Build and publish if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') env: TWINE_USERNAME: ${{ secrets.pypi_username }} TWINE_PASSWORD: ${{ secrets.pypi_password }} run: | - for file in $(find -not -path "./.*" -not -path "./docs*" -name "*.py"); do - sed -i -e "s/0.0.0-auto.0/${{github.event.release.tag_name}}/" $file; + for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do + sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file; done; - python setup.py sdist + python -m build twine upload dist/*