Use python:3.11-bullseye for legacy build #17
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: Build TinyTouch | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| if: ${{ !endsWith(github.ref_name, '-legacy') }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| cache-dependency-path: "requirements.txt" | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install -r requirements.txt | |
| - name: Build (PyInstaller) | |
| run: | | |
| TINYTOUCH_APP_NAME=TinyTouch-${{ github.ref_name }} python -m PyInstaller TinyTouch.spec | |
| - name: Package | |
| run: | | |
| cd dist | |
| zip -r TinyTouch-${{ github.ref_name }}-linux-x64.zip TinyTouch-${{ github.ref_name }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: TinyTouch-linux-x64 | |
| path: dist/TinyTouch-${{ github.ref_name }}-linux-x64.zip | |
| build-linux-legacy: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: python:3.11-bullseye | |
| if: ${{ !endsWith(github.ref_name, '-legacy') }} | |
| steps: | |
| - name: Install system deps | |
| run: | | |
| apt-get update | |
| apt-get install -y git zip | |
| - uses: actions/checkout@v4 | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install -r requirements.txt | |
| - name: Build (PyInstaller) | |
| run: | | |
| TINYTOUCH_APP_NAME=TinyTouch-${{ github.ref_name }} python -m PyInstaller TinyTouch.spec | |
| - name: Package | |
| run: | | |
| cd dist | |
| zip -r TinyTouch-${{ github.ref_name }}-linux-legacy-x64.zip TinyTouch-${{ github.ref_name }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: TinyTouch-linux-legacy-x64 | |
| path: dist/TinyTouch-${{ github.ref_name }}-linux-legacy-x64.zip | |
| build-windows: | |
| runs-on: windows-latest | |
| if: ${{ !endsWith(github.ref_name, '-legacy') }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| cache-dependency-path: "requirements.txt" | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install -r requirements.txt | |
| - name: Build (PyInstaller) | |
| run: | | |
| $env:TINYTOUCH_APP_NAME="TinyTouch-${{ github.ref_name }}" | |
| python -m PyInstaller TinyTouch.spec | |
| - name: Package | |
| run: | | |
| Compress-Archive -Path dist\\TinyTouch-${{ github.ref_name }}.exe -DestinationPath dist\\TinyTouch-${{ github.ref_name }}-windows-x64.zip | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: TinyTouch-windows-x64 | |
| path: dist/TinyTouch-${{ github.ref_name }}-windows-x64.zip | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-linux-legacy, build-windows] | |
| if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref_name, '-legacy') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: TinyTouch ${{ github.ref_name }} | |
| files: | | |
| dist/TinyTouch-linux-x64/TinyTouch-${{ github.ref_name }}-linux-x64.zip | |
| dist/TinyTouch-linux-legacy-x64/TinyTouch-${{ github.ref_name }}-linux-legacy-x64.zip | |
| dist/TinyTouch-windows-x64/TinyTouch-${{ github.ref_name }}-windows-x64.zip |