Skip to content

Commit

Permalink
Separate macOS and Windows build jobs, as it's too conditionalized now
Browse files Browse the repository at this point in the history
  • Loading branch information
jspahrsummers committed Jul 1, 2024
1 parent 027f99d commit 70105ac
Showing 1 changed file with 41 additions and 20 deletions.
61 changes: 41 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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: |
Expand All @@ -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"

0 comments on commit 70105ac

Please sign in to comment.