Skip to content

Commit

Permalink
GitHub. Archive and export
Browse files Browse the repository at this point in the history
  • Loading branch information
MiklinMA committed Mar 27, 2024
1 parent 938d943 commit 4d7594c
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions .github/workflows/xcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,36 @@ jobs:
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Configure git
env:
GIT_TOKEN: ${{ secrets.KEYCHAIN_PASSWORD }}
run:
git config
--global
url."https://${GIT_TOKEN}:[email protected]/".insteadOf
"https://github.com/"

- name: Build and analyze
run:
xcodebuild build analyze
-scheme ${{ github.event.repository.name }}
-destination platform=macOS
-showBuildTimingSummary |
xcpretty && exit ${PIPESTATUS[0]}

- name: Archive
run:
xcodebuild archive
-project "${{ github.event.repository.name }}.xcodeproj"
-scheme ${{ github.event.repository.name }}
-archivePath "dist/${{ github.event.repository.name }}.xcarchive"

- name: Export options
run: |
echo '
<?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>
</dict>
</plist>
' > ExportOptions.plist
- name: Export
run:
xcodebuild -exportArchive
-archivePath "dist/${{ github.event.repository.name }}.xcarchive"
-exportOptionsPlist ExportOptions.plist

0 comments on commit 4d7594c

Please sign in to comment.