Skip to content

Commit

Permalink
Update github_snapshot_build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanlorng authored Nov 5, 2024
1 parent aef17c1 commit 81d9b09
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/github_snapshot_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
type: [PublishLibrary, Android, Windows, Linux, macOS]
type: [PublishLibrary, Android, Windows, Linux, macOS, iOS]
include:
- type: PublishLibrary
publish: release
Expand All @@ -34,6 +34,9 @@ jobs:
- type: macOS
desktop: dmg
os: macos-latest
- type: iOS
iOS: ipa
os: macos-latest

runs-on: ${{ matrix.os }}
permissions:
Expand All @@ -56,6 +59,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

# Publish Snapshot Library
- name: Publish Library
if: ${{ matrix.publish }}
run: |
Expand All @@ -75,6 +79,7 @@ jobs:
name: Repository-${{ github.run_id }}
path: ~/.m2/repository

# Android Build Action
- name: Build Gallery for ${{ matrix.type }}
if: ${{ matrix.android }}
run: |
Expand All @@ -94,6 +99,7 @@ jobs:
name: Gallery-${{ matrix.type }}-${{ github.run_id }}
path: ${{github.workspace}}/gallery/build/outputs/**/*.${{ matrix.android }}

# Desktop Build Action
- name: Build Gallery for ${{ matrix.type }}
if: ${{ matrix.desktop }}
run: |
Expand All @@ -105,3 +111,22 @@ jobs:
with:
name: Gallery-${{ matrix.type }}-${{ github.run_id }}
path: ${{github.workspace}}/gallery/build/compose/binaries/main-release/${{ matrix.desktop }}/*.${{ matrix.desktop }}

# iOS Build Action, Note: Due to the long build time, the iOS build only build the debug version.
- name: Set up Xcode
if: ${{ matrix.iOS }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 'latest-stable'

- name: Build Gallery for iOS
if: ${{ matrix.iOS }}
run: |
xcodebuild -scheme iosApp -configuration Debug -sdk iphoneos -archivePath gallery/iosApp/build/Gallery.xcarchive archive -workspace gallery/iosApp/iosApp.xcodeproj/project.xcworkspace CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- name: Updaload iOS Artifact
if: ${{ matrix.iOS }}
uses: actions/upload-artifact@v4
with:
name: Gallery-${{ matrix.type }}-${{ github.run_id }}
path: ${{ github.workspace }}/gallery/iosApp/build/

0 comments on commit 81d9b09

Please sign in to comment.