changes #9
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: Deploy release | |
| on: | |
| push: | |
| jobs: | |
| common-actions: | |
| name: Run PR Workflow | |
| uses: ./.github/workflows/github-actions-ci.yml | |
| secrets: inherit | |
| deploy-release: | |
| needs: | |
| - common-actions | |
| name: Deploy release from tag | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo with submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| # this should be the lowest supported version | |
| python-version: '3.9' | |
| - name: Install build dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install tox hatch | |
| pip list | |
| - name: Build wheel and source distribution | |
| run: | | |
| hatch build | |
| ls -1 dist | |
| - name: Test installation from a wheel | |
| run: | | |
| tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl | |
| - name: Upload wheel and source distributions to PyPI | |
| run: | | |
| pip install twine | |
| ls -1 dist | |
| twine upload -r testpypi -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing dist/* | |
| # twine upload -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing dist/* | |
| - name: Keep packages | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ failure() }} | |
| with: | |
| name: pypi-wheel-and-sdist | |
| path: | | |
| dist/* | |
| if-no-files-found: error |