Release #73
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 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "The new version number (e.g., 1.1)" | |
| required: true | |
| changelog: | |
| description: "The changelog for this version" | |
| required: true | |
| env: | |
| FORCE_COLOR: true | |
| jobs: | |
| create-tag: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Create Git Tag | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag "v${{ github.event.inputs.version }}" || echo "Tag creation failed (possibly already exists)." | |
| git push origin "v${{ github.event.inputs.version }}" || echo "Tag push failed (possibly already exists)." | |
| build_windows: | |
| runs-on: windows-latest | |
| needs: create-tag | |
| strategy: | |
| matrix: | |
| build_type: [Release, Debug] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set Release variable | |
| run: | | |
| echo "RELEASE=${{ matrix.build_type }}" >> $env:GITHUB_ENV | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if (Test-Path requirements.txt) { | |
| pip install -r requirements.txt | |
| } | |
| "__version__ = '${{ github.event.inputs.version }}'" | Out-File -FilePath _version.py -Encoding utf8 | |
| - name: Build Executable | |
| run: | | |
| Write-Host "Release variable is set to: $env:Release" | |
| if ($env:Release -eq 'Release') { | |
| nuitka ` | |
| --assume-yes-for-downloads ` | |
| --show-scons ` | |
| --clang ` | |
| --lto=yes ` | |
| --jobs=4 ` | |
| --static-libpython=no ` | |
| --standalone ` | |
| --enable-plugin=anti-bloat ` | |
| --show-modules ` | |
| --show-anti-bloat-changes ` | |
| --follow-stdlib ` | |
| --follow-imports ` | |
| --nofollow-import-to="*.tests" ` | |
| --nofollow-import-to="pydoc" ` | |
| --nofollow-import-to="test" ` | |
| --prefer-source-code ` | |
| --include-module=unittest ` | |
| --include-module=seleniumwire ` | |
| --include-module=blinker._saferef ` | |
| --include-package-data=seleniumwire ` | |
| --windows-console-mode=disable ` | |
| --plugin-enable=pyside6 ` | |
| --windows-company-name="Loukious" ` | |
| --windows-product-name="StreamLabs TikTok Stream Key Generator" ` | |
| --windows-file-version="${{ github.event.inputs.version }}" ` | |
| --windows-product-version="${{ github.event.inputs.version }}" ` | |
| --windows-file-description="StreamLabs TikTok Stream Key Generator" ` | |
| --copyright="Copyright © 2025 Loukious" ` | |
| StreamLabsTikTokStreamKeyGenerator.py | |
| } else { | |
| nuitka ` | |
| --assume-yes-for-downloads ` | |
| --show-scons ` | |
| --clang ` | |
| --lto=yes ` | |
| --jobs=4 ` | |
| --static-libpython=no ` | |
| --standalone ` | |
| --enable-plugin=anti-bloat ` | |
| --show-modules ` | |
| --show-anti-bloat-changes ` | |
| --follow-stdlib ` | |
| --follow-imports ` | |
| --nofollow-import-to="*.tests" ` | |
| --nofollow-import-to="pydoc" ` | |
| --nofollow-import-to="test" ` | |
| --prefer-source-code ` | |
| --include-module=unittest ` | |
| --include-module=seleniumwire ` | |
| --include-module=blinker._saferef ` | |
| --include-package-data=seleniumwire ` | |
| --plugin-enable=pyside6 ` | |
| StreamLabsTikTokStreamKeyGenerator.py | |
| } | |
| - name: Compress Executable | |
| run: Compress-Archive -Path StreamLabsTikTokStreamKeyGenerator.dist\* -DestinationPath StreamLabsTikTokStreamKeyGenerator${{ matrix.build_type }}-win-${{ github.event.inputs.version }}.zip | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-${{ matrix.build_type }} | |
| path: | | |
| *.zip | |
| build_macos: | |
| runs-on: macos-latest | |
| needs: create-tag | |
| strategy: | |
| matrix: | |
| architecture: [x86_64, arm64] | |
| build_type: [Release] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| echo "__version__ = '${{ github.event.inputs.version }}'" > _version.py | |
| - name: Build Executable | |
| run: | | |
| arch -${{ matrix.architecture }} nuitka \ | |
| --assume-yes-for-downloads \ | |
| --show-scons \ | |
| --clang \ | |
| --lto=yes \ | |
| --jobs=4 \ | |
| --static-libpython=no \ | |
| --standalone \ | |
| --enable-plugin=anti-bloat \ | |
| --enable-plugin=pyside6 \ | |
| --include-package=certifi \ | |
| --include-module=seleniumwire \ | |
| --include-module=blinker._saferef \ | |
| --include-package-data=seleniumwire \ | |
| --prefer-source-code \ | |
| --macos-target-arch=${{ matrix.architecture }} \ | |
| --macos-create-app-bundle \ | |
| --macos-app-version="${{ github.event.inputs.version }}" \ | |
| --macos-app-name="StreamLabs TikTok Stream Key Generator" \ | |
| StreamLabsTikTokStreamKeyGenerator.py | |
| - name: Compress Executable | |
| run: | | |
| zip -r StreamLabsTikTokStreamKeyGenerator-${{ matrix.architecture }}-macos-${{ github.event.inputs.version }}.zip StreamLabsTikTokStreamKeyGenerator.app | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-${{ matrix.architecture }} | |
| path: | | |
| *.zip | |
| build_linux: | |
| runs-on: ubuntu-22.04 | |
| needs: create-tag | |
| strategy: | |
| matrix: | |
| build_type: [Release] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ccache python3-pip zip python3-distutils | |
| python3 -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi | |
| echo "__version__ = '${{ github.event.inputs.version }}'" > _version.py | |
| - name: Build Executable | |
| run: | | |
| nuitka \ | |
| --assume-yes-for-downloads \ | |
| --show-scons \ | |
| --clang \ | |
| --lto=yes \ | |
| --jobs=4 \ | |
| --static-libpython=no \ | |
| --standalone \ | |
| --enable-plugin=anti-bloat \ | |
| --enable-plugin=pyside6 \ | |
| --include-module=seleniumwire \ | |
| --include-module=blinker._saferef \ | |
| --include-package-data=seleniumwire \ | |
| --include-package=certifi \ | |
| --show-modules \ | |
| --show-anti-bloat-changes \ | |
| --follow-stdlib \ | |
| --follow-imports \ | |
| --prefer-source-code \ | |
| StreamLabsTikTokStreamKeyGenerator.py | |
| - name: Compress Executable | |
| run: zip -r StreamLabsTikTokStreamKeyGenerator-linux-${{ github.event.inputs.version }}.zip StreamLabsTikTokStreamKeyGenerator.dist/* | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux- | |
| path: | | |
| *.zip | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [build_linux, build_windows, build_macos] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts/ | |
| - name: Create the release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: "v${{ github.event.inputs.version }}" | |
| body: ${{ github.event.inputs.changelog }} | |
| files: "artifacts/**/*.zip" |