Skip to content

Commit

Permalink
chore: Update build workflow to include macOS build and artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Loukious committed Aug 8, 2024
1 parent 88c16e5 commit 959ce78
Showing 1 changed file with 60 additions and 6 deletions.
66 changes: 60 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
FORCE_COLOR: true

jobs:
build:
build_windows:
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -42,14 +42,66 @@ jobs:
dist/StreamLabsTikTokStreamKeyGeneratorRelease.exe
dist/StreamLabsTikTokStreamKeyGeneratorDebug.exe
build_macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pyinstaller
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build Normal Executable (without console)
run: pyinstaller --onefile --clean -w StreamLabsTikTokStreamKeyGenerator.py
- name: Create .app Bundle
run: |
mkdir -p dist/StreamLabsTikTokStreamKeyGenerator.app/Contents/MacOS
mv dist/StreamLabsTikTokStreamKeyGenerator dist/StreamLabsTikTokStreamKeyGenerator.app/Contents/MacOS/StreamLabsTikTokStreamKeyGenerator
- name: Zip Normal Executable
run: zip -r dist/StreamLabsTikTokStreamKeyGeneratorRelease.MacOS.zip dist/StreamLabsTikTokStreamKeyGenerator.app
- name: Build Debug Executable (with console)
run: pyinstaller --onefile --clean StreamLabsTikTokStreamKeyGenerator.py
- name: Create .app Bundle for Debug
run: |
mkdir -p dist/StreamLabsTikTokStreamKeyGenerator.app/Contents/MacOS
mv dist/StreamLabsTikTokStreamKeyGenerator dist/StreamLabsTikTokStreamKeyGenerator.app/Contents/MacOS/StreamLabsTikTokStreamKeyGenerator
- name: Zip Debug Executable
run: zip -r dist/StreamLabsTikTokStreamKeyGeneratorDebug.MacOS.zip dist/StreamLabsTikTokStreamKeyGenerator.app
- name: Clean up obsolete files
run: rm -rf build StreamLabsTikTokStreamKeyGenerator.spec

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: macos
path: |
dist/StreamLabsTikTokStreamKeyGeneratorRelease.MacOS.zip
dist/StreamLabsTikTokStreamKeyGeneratorDebug.MacOS.zip
release:
runs-on: windows-latest
needs: [build]
runs-on: ubuntu-latest
needs: [build_windows, build_macos]

steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/download-artifact@v3
- name: Download Windows artifacts
uses: actions/download-artifact@v3
with:
name: windows
path: ./windows

- name: Download MacOS artifacts
uses: actions/download-artifact@v3
with:
name: macos
path: ./macos

- name: Create the release
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v1
Expand All @@ -60,5 +112,7 @@ jobs:
prerelease: false
draft: false
files: |
windows/StreamLabsTikTokStreamKeyGeneratorRelease.exe
windows/StreamLabsTikTokStreamKeyGeneratorDebug.exe
./windows/StreamLabsTikTokStreamKeyGeneratorRelease.exe
./windows/StreamLabsTikTokStreamKeyGeneratorDebug.exe
./macos/StreamLabsTikTokStreamKeyGeneratorRelease.MacOS.zip
./macos/StreamLabsTikTokStreamKeyGeneratorDebug.MacOS.zip

0 comments on commit 959ce78

Please sign in to comment.