Skip to content

Adding Windows support #26

Adding Windows support

Adding Windows support #26

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*' # Triggert auf Tags wie v1.0.0, v1.0.1, etc.
permissions:
contents: write
jobs:
build-macos:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install Dependencies with Constraint
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: |
cd dist
zip -r Mastermind-mac.zip Mastermind.app
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload macOS Build Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/Mastermind-mac.zip
asset_name: Mastermind-mac.zip
asset_content_type: application/zip
build-windows:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install Dependencies with Constraint
run: python -m pip install -r requirements.txt
- name: Run Build Script for Windows
run: |
python build_script_windows.py # Führt das Windows-Build-Skript aus
ls -a
cd dist
ls -a
cd ..
- name: Zip the .exe file
run: |
cd dist
powershell Compress-Archive -Path Mastermind -DestinationPath Mastermind-win.zip
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Windows Build Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/Mastermind-win.zip
asset_name: Mastermind-win.zip
asset_content_type: application/zip