From 70105ac114784c41ebafa6fb288f0014847f27f3 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Mon, 1 Jul 2024 13:58:05 +0100 Subject: [PATCH] Separate macOS and Windows build jobs, as it's too conditionalized now --- .github/workflows/main.yml | 61 +++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 83e3bd43..73dead94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,26 +8,12 @@ concurrency: cancel-in-progress: true jobs: - build: - strategy: - fail-fast: false - matrix: - config: - - preset: macOS - artifact: mac.zip - channel: mac - runner: macos-latest - - preset: Windows - artifact: Windows - channel: windows - runner: ubuntu-latest - - runs-on: ${{ matrix.config.runner }} + build-mac: + runs-on: macos-latest steps: + # See https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development - name: Install Apple codesigning certificate - if: ${{ matrix.config.preset == 'macOS' }} - # See https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development env: BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_CODESIGNING_CERTIFICATE }} P12_PASSWORD: ${{ secrets.APPLE_CODESIGNING_P12_PASSWORD }} @@ -50,6 +36,41 @@ jobs: security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH security list-keychain -d user -s $KEYCHAIN_PATH + - name: Install Godot + working-directory: ${{ env.RUNNER_TEMP }} + run: | + curl -sL https://github.com/godotengine/godot/releases/download/4.2.2-stable/Godot_v4.2.2-stable_macos.universal.zip -o godot.zip + unzip godot.zip + mv Godot.app "$RUNNER_TEMP/Godot.app" + + - name: Install butler + working-directory: ${{ env.RUNNER_TEMP }} + run: | + curl -sL https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default -o butler.zip + unzip butler.zip + mv butler "$RUNNER_TEMP/butler" + + - uses: actions/checkout@v4 + + - name: Prepare export templates + run: | + mkdir -p ~/.local/share/godot/export_templates/4.2.2.stable + mv build/export_templates/* ~/.local/share/godot/export_templates/4.2.2.stable/ + + - name: Export build + run: | + "$RUNNER_TEMP/Godot.app/Contents/MacOS/Godot" --headless --export-release macOS + + - name: Push to itch.io + env: + BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} + run: | + "$RUNNER_TEMP/butler" push build/mac.zip "jspahrsummers/Merc:mac" + + build-windows: + runs-on: ubuntu-latest + + steps: - name: Install Godot working-directory: ${{ env.RUNNER_TEMP }} run: | @@ -71,12 +92,12 @@ jobs: mkdir -p ~/.local/share/godot/export_templates/4.2.2.stable mv build/export_templates/* ~/.local/share/godot/export_templates/4.2.2.stable/ - - name: Export ${{ matrix.config.preset }} build + - name: Export build run: | - "$RUNNER_TEMP/godot" --headless --export-release "${{ matrix.config.preset }}" + "$RUNNER_TEMP/godot" --headless --export-release Windows - name: Push to itch.io env: BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} run: | - "$RUNNER_TEMP/butler" push "build/${{ matrix.config.artifact }}" "jspahrsummers/Merc:${{ matrix.config.channel }}" + "$RUNNER_TEMP/butler" push build/Windows "jspahrsummers/Merc:windows"