diff --git a/.github/workflows/test_and_release.yml b/.github/workflows/test_and_release.yml index ee0e3b4..9699343 100644 --- a/.github/workflows/test_and_release.yml +++ b/.github/workflows/test_and_release.yml @@ -35,7 +35,12 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Build run: | - python setup.py bdist + python setup.py sdist + - name: Store distribution packages + uses: actions/upload-artifact@v3 + with: + name: dist + path: dist/ test: @@ -74,20 +79,17 @@ jobs: needs: test if: startsWith(github.ref, 'refs/tags/v') + environment: + name: pypi + url: https://pypi.org/p/zxing + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 + - name: Download distribution packages + uses: actions/download-artifact@v3 with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine + name: dist + path: dist/ - name: Deploy to PyPI - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/zxing/version.py b/zxing/version.py index 5c4105c..7863915 100644 --- a/zxing/version.py +++ b/zxing/version.py @@ -1 +1 @@ -__version__ = "1.0.1" +__version__ = "1.0.2"