diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9aa34ef..37b2c6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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