Updated build system for platform-specific output, now creates .app b… #33
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: Release Multi-Platform | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| build-arm64: | |
| name: Build macOS ARM64 | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: pip install .[dev] | |
| - name: Convert PNG to ICNS | |
| run: sips -s format icns podcast.png --out podcast.icns | |
| - name: Build executable ARM64 | |
| run: python -m PyInstaller "Podcast Generator.spec" | |
| - name: Package ARM64 tar.gz | |
| run: tar -czvf Podcast_Generator_${{ github.ref_name }}_MacOS_arm64.tar.gz -C dist "Podcast Generator.app" | |
| - name: Upload ARM64 artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-macos-arm64 | |
| path: Podcast_Generator_${{ github.ref_name }}_MacOS_arm64.tar.gz | |
| build-intel: | |
| name: Build macOS Intel | |
| runs-on: [self-hosted, macos, x64] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check Python version | |
| run: python3 --version | |
| - name: Install dependencies | |
| run: pip3 install .[dev] | |
| - name: Convert PNG to ICNS | |
| run: sips -s format icns podcast.png --out podcast.icns | |
| - name: Build executable Intel | |
| run: python3 -m PyInstaller "Podcast Generator.spec" | |
| - name: Package Intel tar.gz | |
| run: tar -czvf Podcast_Generator_${{ github.ref_name }}_MacOS_x86_64.tar.gz -C dist "Podcast Generator.app" | |
| - name: Upload Intel artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-macos-intel | |
| path: Podcast_Generator_${{ github.ref_name }}_MacOS_x86_64.tar.gz | |
| build-windows: | |
| name: Build Windows | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install ImageMagick | |
| run: choco install imagemagick -y | |
| - name: Convert PNG to ICO | |
| run: magick convert podcast.png -define icon:auto-resize=256,128,64,48,32,16 podcast.ico | |
| - name: Install Python dependencies | |
| run: pip install .[dev] | |
| - name: Build Windows executable | |
| run: python -m PyInstaller "Podcast Generator.spec" | |
| - name: Package Windows tar.gz | |
| run: tar -czvf Podcast_Generator_${{ github.ref_name }}_windows.tar.gz -C dist "Podcast Generator" | |
| - name: Upload Windows ZIP artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-windows | |
| path: Podcast_Generator_${{ github.ref_name }}_windows.tar.gz | |
| build-linux: | |
| name: Build Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: pip install .[dev] | |
| - name: Build executable Linux | |
| run: python -m PyInstaller "Podcast Generator.spec" | |
| - name: Package Linux tar.gz | |
| run: tar -czvf Podcast_Generator_${{ github.ref_name }}_linux.tar.gz -C dist "Podcast Generator" | |
| - name: Upload Linux artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-linux | |
| path: Podcast_Generator_${{ github.ref_name }}_linux.tar.gz | |
| release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: [build-arm64, build-intel, build-windows, build-linux] | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create GitHub Release and Upload Assets | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| files: | | |
| artifacts/dist-macos-arm64/*.tar.gz | |
| artifacts/dist-macos-intel/*.tar.gz | |
| artifacts/dist-windows/*.tar.gz | |
| artifacts/dist-linux/*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |