Skip to content

Commit

Permalink
[chore] auto Archive
Browse files Browse the repository at this point in the history
  • Loading branch information
mrs1669 committed May 14, 2024
1 parent edef7a3 commit d758e4f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/archive-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
- name: Archive Project
run: |
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
xcodebuild archive -project IOSTemplateApp.xcodeproj \
xcodebuild archive -"$filetype_parameter" "$file_to_build" \
-scheme $default \
-sdk iphoneos \
-configuration Release \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/archive-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
- name: Archive Project
run: |
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
xcodebuild archive -project IOSTemplateApp.xcodeproj \
xcodebuild archive -"$filetype_parameter" "$file_to_build" \
-scheme $default \
-sdk iphoneos \
-configuration Release \
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/release-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
- name: Archive Project
run: |
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
xcodebuild archive -project IOSTemplateApp.xcodeproj \
-scheme $default \
-sdk iphoneos \
-configuration Release \
-archivePath build.xcarchive \
CODE_SIGNING_ALLOWED=NO
xcodebuild archive -"$filetype_parameter" "$file_to_build" \
-scheme $default \
-sdk iphoneos \
-configuration Release \
-archivePath build.xcarchive \
CODE_SIGNING_ALLOWED=NO
- name: Create ExportOptions.plist
run: |
Expand Down

0 comments on commit d758e4f

Please sign in to comment.