Skip to content

Commit

Permalink
Adding Windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
frievoe97 committed Aug 27, 2024
1 parent d74e89b commit cbb3219
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ permissions:
jobs:
build-macos:
runs-on: macos-latest
outputs:
mac_zip: ${{ steps.upload_macos.outputs.artifact_path }}

steps:
- name: Checkout Repository
Expand All @@ -25,22 +27,17 @@ jobs:
run: python -m pip install -r requirements.txt

- name: Run Build Script for macOS
run: python build_script_macos.py # Führt das macOS-Build-Skript aus

- name: Zip the .app file
run: |
python build_script_macos.py
cd dist
zip -r Mastermind-mac.zip Mastermind.app
- name: Upload macOS Build Artifact
echo "::set-output name=artifact_path::$(pwd)/dist/Mastermind-mac.zip"
id: upload_macos
uses: actions/upload-artifact@v3
with:
name: Mastermind-mac
path: dist/Mastermind-mac.zip

build-windows:
runs-on: windows-latest
outputs:
win_zip: ${{ steps.upload_windows.outputs.artifact_path }}

steps:
- name: Checkout Repository
Expand All @@ -56,29 +53,15 @@ jobs:

- name: Run Build Script for Windows
run: |
python build_script_windows.py # Führt das Windows-Build-Skript aus
- name: List Files in dist
run: |
cd dist
dir # Auf Windows verwendet, um den Inhalt des Verzeichnisses aufzulisten
- name: Zip the .exe file
run: |
python build_script_windows.py
cd dist
powershell Compress-Archive -Path Mastermind -DestinationPath Mastermind-win.zip
- name: Upload Windows Build Artifact
echo "::set-output name=artifact_path::$(pwd)/dist/Mastermind-win.zip"
id: upload_windows
uses: actions/upload-artifact@v3
with:
name: Mastermind-win
path: dist/Mastermind-win.zip

create-release:
runs-on: ubuntu-latest
needs: [build-macos, build-windows]

steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -100,7 +83,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/dist/Mastermind-mac.zip
asset_path: ${{ needs.build-macos.outputs.mac_zip }}
asset_name: Mastermind-mac.zip
asset_content_type: application/zip

Expand All @@ -110,6 +93,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/dist/Mastermind-win.zip
asset_path: ${{ needs.build-windows.outputs.win_zip }}
asset_name: Mastermind-win.zip
asset_content_type: application/zip

0 comments on commit cbb3219

Please sign in to comment.