Skip to content

Commit

Permalink
feat: build and archive the app
Browse files Browse the repository at this point in the history
  • Loading branch information
okwasniewski committed Aug 31, 2024
1 parent ceb85f7 commit 1f884e9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 12 deletions.
37 changes: 25 additions & 12 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,48 @@
name: Build MiniSim

name: Build App
on:
pull_request:
branches:
- main
push:
branches:
- main

concurrency:
group: ${{ github.ref }}-build
cancel-in-progress: true

jobs:
build:
test:
runs-on: macos-13

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15

- name: Install XCBeautify
run: brew install xcbeautify

- name: Test
run: set -o pipefail && xcodebuild -scheme MiniSim -destination 'platform=macOS' -skipPackagePluginValidation -skipMacroValidation test COMPILER_INDEX_STORE_ENABLE=NO | xcbeautify

- name: Build
run: set -o pipefail && xcodebuild -scheme MiniSim -destination 'platform=macOS' -skipPackagePluginValidation -skipMacroValidation build COMPILER_INDEX_STORE_ENABLE=NO | xcbeautify
archive:
env:
TEAM_ID: Z3M9P6G4WY
runs-on: macos-13
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15
- name: Archive and Export
run: |
set -o pipefail && xcodebuild -scheme MiniSim -destination 'platform=macOS' -skipPackagePluginValidation -skipMacroValidation archive -archivePath $PWD/build/MiniSim.xcarchive CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcbeautify
xcodebuild -exportArchive -archivePath $PWD/build/MiniSim.xcarchive -exportPath $PWD/build -exportOptionsPlist $PWD/exportOptions.plist | xcbeautify
codesign --force --options runtime --sign "$TEAM_ID" $PWD/build/MiniSim.app
- name: Zip .app
run: zip -r MiniSim.zip build/MiniSim.app
- name: Upload zipped .app artifact
uses: actions/upload-artifact@v2
with:
name: MiniSim.zip
path: MiniSim.zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
buildServer.json

## Obj-C/Swift specific
*.hmap
Expand Down
10 changes: 10 additions & 0 deletions exportOptions.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>mac-application</string>
<key>teamID</key>
<string>Z3M9P6G4WY</string>
</dict>
</plist>

0 comments on commit 1f884e9

Please sign in to comment.