PyPI #85
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: PyPI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'VERSION' | |
| workflow_dispatch: | |
| inputs: | |
| upload: | |
| description: 'Upload to PyPI' | |
| required: true | |
| type: boolean | |
| jobs: | |
| Test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| version: ['3.11'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.version }} | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt install -y desktop-file-utils | |
| pip install requests | |
| - name: Test local builder | |
| run: | | |
| python -m python_appimage build local -p $(which python) \ | |
| -d test.AppImage | |
| test -e test.AppImage | |
| Publish: | |
| needs: Test | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Build wheel | |
| run: | | |
| pip install -U pip | |
| pip install -U wheel | |
| python setup.py bdist_wheel --universal | |
| - name: Upload to PyPI | |
| if: (github.ref == 'refs/heads/master') && inputs.upload | |
| uses: pypa/gh-action-pypi-publish@master | |
| with: | |
| password: ${{ secrets.PYPI_TOKEN }} |