feat: Standalone App Packaging & Setup Flow #15
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: [ 'v*' ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| name: Build on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # macos-13 is the last Intel runner | |
| # macos-14 is Apple Silicon (M1) | |
| os: [ubuntu-latest, windows-latest, macos-14] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Build with PyInstaller | |
| run: uv run python build_app.py | |
| - name: Zip Build Output (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| cd dist | |
| zip -r ../gmail-cleaner-${{ matrix.os }}.zip gmail-cleaner/ | |
| - name: Zip Build Output (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| Compress-Archive -Path dist/gmail-cleaner -DestinationPath gmail-cleaner-${{ matrix.os }}.zip | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gmail-cleaner-${{ matrix.os }} | |
| path: gmail-cleaner-${{ matrix.os }}.zip | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: gmail-cleaner-${{ matrix.os }}.zip | |