Skip to content

Commit 22c5215

Browse files
observableobjectVincent Frascello
andauthored
Releasing Cocoapods and SPM support. (#10)
* Added XCode selection and console outputs * Updated version of setup-xcode * Updated Readme. * Added Cocoapods and SPM support. (#9) * Testing Cocoapods and SPM * Added Shell * removed bundler * testing conditional logic * adding echo and conditional logic * Fixed XCode Version and cleanup. Co-authored-by: Vincent Frascello <[email protected]> * Updated Readme. Co-authored-by: Vincent Frascello <[email protected]>
1 parent 740fe76 commit 22c5215

File tree

2 files changed

+43
-5
lines changed

2 files changed

+43
-5
lines changed

Readme.MD

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# XCode-Deploy 1.4
1+
2+
# XCode-Deploy 1.5
23
This action will archive, export, and upload your project or workspace to App Store Connect (TestFlight).
34
It is designed to run on a containerized VM, such as a GitHub Hosted Runner.
45
If self-hosting, some of these steps may be unnecessary or redundant.
@@ -25,6 +26,14 @@ The path to the `ExportOptions.plist` file, required for `-exportArchive`. Will
2526

2627
A boolean value that will set the `version-number` to the commit depth. If false, nothing happens. See also `agvtool`'s `-new-version`.
2728

29+
### `install-pods`
30+
31+
A boolean value that will run `pod install` if true. If false, nothing happens.
32+
33+
### `resolve-package-dependencies`
34+
35+
A boolean value that will run `xcodebuild -resolvePackageDependencies -clonedSourcePackagesDirPath .` if true. If false, nothing happens.
36+
2837
### `distribution-certificate-p12`
2938

3039
The `base64` representation of your Apple/iOS Distribution Certificate and private key pair.
@@ -55,13 +64,15 @@ You can generate one of these by doing a local export in XCode and then copy it
5564
## Sample Usage
5665
```yml
5766
- name: Deploy
58-
uses: vfrascello/xcode-deploy@v1.4
67+
uses: vfrascello/xcode-deploy@v1.5
5968
with:
6069
xcode-version: '14.0'
6170
configuration: 'Release'
6271
scheme: 'MyScheme'
6372
path-to-export-options: 'ExportOptions.plist'
6473
update-build: true
74+
install-pods: false
75+
resolve-package-dependencies: true
6576
distribution-certificate-p12: ${{ secrets.DISTRIBUTION_CERTIFICATE_P12 }}
6677
distribution-certificate-password: ${{ secrets.DISTRIBUTION_CERTIFICATE_PASSWORD }}
6778
app-store-provisioning-profile: ${{ secrets.APPSTORE_PROVISIONING_PROFILE}}

action.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ inputs:
3030
options:
3131
- true
3232
- false
33+
install-pods:
34+
description: 'Run Pod Install'
35+
required: true
36+
default: false
37+
type: choice
38+
options:
39+
- true
40+
- false
41+
resolve-package-dependencies:
42+
description: 'Resolve Package Dependencies'
43+
required: true
44+
default: false
45+
type: choice
46+
options:
47+
- true
48+
- false
3349
distribution-certificate-p12:
3450
description: 'base64 representation of the distribution certificate.'
3551
required: true
@@ -84,6 +100,18 @@ runs:
84100
echo "TYPE=$filetype_parameter" >> $GITHUB_ENV
85101
echo "FILE_TO_BUILD=$file_to_build" >> $GITHUB_ENV
86102
echo "PROJECT_NAME=$(echo "$file_to_build" | cut -f 1 -d '.')" >> $GITHUB_ENV
103+
- name: Setup Pods
104+
if: inputs.install-pods == 'true'
105+
shell: bash
106+
run: |
107+
echo "[XCode-Deploy]: Installing Pods..."
108+
pod install
109+
- name: Resolve Package Dependencies
110+
if: inputs.resolve-package-dependencies == 'true'
111+
shell: bash
112+
run: |
113+
echo "[XCode-Deploy]: Resolving Package Dependencies..."
114+
xcodebuild -resolvePackageDependencies -clonedSourcePackagesDirPath .
87115
- name: Setup Scheme
88116
shell: bash
89117
run: |
@@ -112,15 +140,14 @@ runs:
112140
- name: Select Xcode
113141
uses: maxim-lobanov/[email protected]
114142
with:
115-
xcode-version: '14.0'
143+
xcode-version: ${{ inputs.xcode-version }}
116144
- name: Increment Build Number
117145
shell: bash
146+
if: inputs.update-build == 'true'
118147
run: |
119-
if ${{ inputs.update-build }}; then
120148
echo "[XCode-Deploy]: Updating Build Number to commit depth..."
121149
count=`git rev-list --count HEAD`
122150
xcrun agvtool new-version -all $count
123-
fi
124151
- name: Build and Archive
125152
uses: sersoft-gmbh/xcodebuild-action@v2
126153
with:

0 commit comments

Comments
 (0)