Skip to content

Commit

Permalink
Create single PR for binary updates
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipoo committed Sep 22, 2024
1 parent a035dd9 commit 788afa6
Showing 1 changed file with 66 additions and 20 deletions.
86 changes: 66 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ jobs:
with:
user_id: ${{ steps.get_uid.outputs.uid }}

- name: Create pull request
uses: peter-evans/create-pull-request@v6
- name: Compress native directory
run: tar -cf native-${{ matrix.platform.name }}.tar native

- name: Upload native artifact
uses: actions/upload-artifact@v4
with:
commit-message: Update ${{ matrix.platform.name }} SDL binaries
title: Update ${{ matrix.platform.name }} SDL binaries
body: This PR has been auto-generated to update the ${{ matrix.platform.name }} SDL binaries.
branch: update-${{ matrix.platform.name }}-binaries
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
name: native-${{ matrix.platform.name }}
path: native-${{ matrix.platform.name }}.tar
if-no-files-found: error

build-ios:
name: ios
Expand All @@ -104,15 +104,15 @@ jobs:
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3 native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3;
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist;
- name: Create pull request
uses: peter-evans/create-pull-request@v6
- name: Compress native directory
run: tar -cf native-ios.tar native

- name: Upload native artifact
uses: actions/upload-artifact@v4
with:
commit-message: Update iOS SDL binaries
title: Update iOS SDL binaries
body: This PR has been auto-generated to update the iOS SDL binaries
branch: update-ios-binaries
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
name: native-ios
path: native-ios.tar
if-no-files-found: error

build-android:
name: android
Expand Down Expand Up @@ -165,12 +165,58 @@ jobs:
javac -cp $ANDROID_HOME/platforms/$PLATFORM_VER/android.jar -encoding utf8 org/libsdl/app/*.java
jar cvf $OUTPUT/SDL3AndroidBridge.jar org/libsdl/app/*.class
- name: Compress native directory
run: tar -cf native-android.tar native

- name: Upload native artifact
uses: actions/upload-artifact@v4
with:
name: native-android
path: native-android.tar
if-no-files-found: error

- name: Upload JAR artifact
uses: actions/upload-artifact@v4
with:
name: android-jar
path: SDL3-CS.Android/Jars/SDL3AndroidBridge.jar
if-no-files-found: error

make-pr:
name: Submit pull request
runs-on: ubuntu-latest
needs: [ build, build-ios, build-android ]
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Download native artifacts
uses: actions/download-artifact@v4
with:
pattern: native-*
merge-multiple: true

- name: Decompress native artifacts
run: |
for file in native-*.tar
do
tar -xf "$file"
done
rm native-*.tar
- name: Download JAR artifact
uses: actions/download-artifact@v4
with:
name: android-jar
path: SDL3-CS.Android/Jars/

- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update Android SDL binaries
title: Update Android SDL binaries
body: This PR has been auto-generated to update the Android SDL binaries
branch: update-android-binaries
commit-message: Update native binaries
title: Update native binaries
body: This PR has been auto-generated to update the native SDL binaries
branch: update-native-binaries
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

0 comments on commit 788afa6

Please sign in to comment.