diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aa7bd4c..501201b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,12 +28,22 @@ jobs: - name: Run Build Script for macOS run: | + echo "Starting macOS build script..." python build_script_macos.py + echo "Building macOS ZIP file..." cd dist zip -r Mastermind-mac.zip Mastermind.app - echo "::set-output name=artifact_path::$(pwd)/Mastermind-mac.zip" + echo "macOS ZIP file created at $(pwd)/Mastermind-mac.zip" + echo "artifact_path=$(pwd)/Mastermind-mac.zip" >> $GITHUB_ENV id: upload_macos + - name: List Files in dist (macOS) + run: | + echo "Listing files in dist directory..." + cd dist + ls -al + echo "macOS build completed." + build-windows: runs-on: windows-latest outputs: @@ -53,12 +63,22 @@ jobs: - name: Run Build Script for Windows run: | + echo "Starting Windows build script..." python build_script_windows.py + echo "Building Windows ZIP file..." cd dist powershell Compress-Archive -Path Mastermind -DestinationPath Mastermind-win.zip - echo "::set-output name=artifact_path::$(pwd)/Mastermind-win.zip" + echo "Windows ZIP file created at $(pwd)/Mastermind-win.zip" + echo "artifact_path=$(pwd)/Mastermind-win.zip" >> $GITHUB_ENV id: upload_windows + - name: List Files in dist (Windows) + run: | + echo "Listing files in dist directory..." + cd dist + dir + echo "Windows build completed." + create-release: runs-on: ubuntu-latest needs: [build-macos, build-windows] @@ -68,16 +88,24 @@ jobs: - 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 + run: | + echo "Creating release..." + echo "Tag: ${{ github.ref }}" + echo "Release name: Release ${{ github.ref }}" + echo "Creating GitHub release..." + curl -X POST \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -d '{"tag_name": "${{ github.ref }}", "name": "Release ${{ github.ref }}", "draft": false, "prerelease": false}' \ + https://api.github.com/repos/${{ github.repository }}/releases + echo "Release created." - name: Upload macOS Build Artifact + run: | + echo "Uploading macOS artifact..." + echo "Upload URL: ${{ steps.create_release.outputs.upload_url }}" + echo "Asset path: ${{ needs.build-macos.outputs.mac_zip }}" + echo "Asset name: Mastermind-mac.zip" uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -88,6 +116,11 @@ jobs: asset_content_type: application/zip - name: Upload Windows Build Artifact + run: | + echo "Uploading Windows artifact..." + echo "Upload URL: ${{ steps.create_release.outputs.upload_url }}" + echo "Asset path: ${{ needs.build-windows.outputs.win_zip }}" + echo "Asset name: Mastermind-win.zip" uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}