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 Python Distribution | |
| on: push | |
| jobs: | |
| build_release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.12" | |
| - run: python3 -m pip install virtualenv cx_Freeze | |
| - run: python3 -m virtualenv venv | |
| - run: .\venv\Scripts\activate.bat | |
| - run: pip install . | |
| - run: cxfreeze build_exe | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: build_release | |
| path: build/exe.win*/ | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [ build_release ] | |
| name: Create release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build_release | |
| path: . | |
| - name: Bundle App | |
| run: | | |
| cd exe.win* | |
| zip -r SETS.zip . | |
| mv SETS.zip .. | |
| cd .. | |
| - name: Create release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: SETS.zip |