v1.6.2-beta #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Upload Python Package | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| jobs: | |
| release-build: | |
| name: Build and upload release artifacts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip pytest | |
| pip install -r src/requirements.txt | |
| - name: Build release distributions | |
| run: | | |
| python -m pip install --upgrade pip pytest setuptools wheel | |
| python setup.py sdist bdist_wheel | |
| - name: Install and test the package | |
| run: | | |
| pip install dist/*.whl | |
| pytest tests | |
| - name: Upload distributions | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| pypi-publish: | |
| name: Publish release distributions to PyPI | |
| runs-on: ubuntu-latest | |
| needs: | |
| - release-build | |
| permissions: | |
| id-token: write | |
| environment: | |
| name: pypi | |
| url: https://test.pypi.org/legacy/ | |
| steps: | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| - name: Publish release distributions to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # release/v1 | |
| with: | |
| verbose: true | |
| print-hash: true |