diff --git a/Readme.MD b/Readme.MD index 5dbdb93..28aa624 100644 --- a/Readme.MD +++ b/Readme.MD @@ -1,4 +1,5 @@ -# XCode-Deploy 1.4 + +# XCode-Deploy 1.5 This action will archive, export, and upload your project or workspace to App Store Connect (TestFlight). It is designed to run on a containerized VM, such as a GitHub Hosted Runner. 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 A boolean value that will set the `version-number` to the commit depth. If false, nothing happens. See also `agvtool`'s `-new-version`. +### `install-pods` + +A boolean value that will run `pod install` if true. If false, nothing happens. + +### `resolve-package-dependencies` + +A boolean value that will run `xcodebuild -resolvePackageDependencies -clonedSourcePackagesDirPath .` if true. If false, nothing happens. + ### `distribution-certificate-p12` 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 ## Sample Usage ```yml - name: Deploy - uses: vfrascello/xcode-deploy@v1.4 + uses: vfrascello/xcode-deploy@v1.5 with: xcode-version: '14.0' configuration: 'Release' scheme: 'MyScheme' path-to-export-options: 'ExportOptions.plist' update-build: true + install-pods: false + resolve-package-dependencies: true distribution-certificate-p12: ${{ secrets.DISTRIBUTION_CERTIFICATE_P12 }} distribution-certificate-password: ${{ secrets.DISTRIBUTION_CERTIFICATE_PASSWORD }} app-store-provisioning-profile: ${{ secrets.APPSTORE_PROVISIONING_PROFILE}} diff --git a/action.yml b/action.yml index 102b375..ff0fe85 100644 --- a/action.yml +++ b/action.yml @@ -30,6 +30,22 @@ inputs: options: - true - false + install-pods: + description: 'Run Pod Install' + required: true + default: false + type: choice + options: + - true + - false + resolve-package-dependencies: + description: 'Resolve Package Dependencies' + required: true + default: false + type: choice + options: + - true + - false distribution-certificate-p12: description: 'base64 representation of the distribution certificate.' required: true @@ -84,6 +100,18 @@ runs: echo "TYPE=$filetype_parameter" >> $GITHUB_ENV echo "FILE_TO_BUILD=$file_to_build" >> $GITHUB_ENV echo "PROJECT_NAME=$(echo "$file_to_build" | cut -f 1 -d '.')" >> $GITHUB_ENV + - name: Setup Pods + if: inputs.install-pods == 'true' + shell: bash + run: | + echo "[XCode-Deploy]: Installing Pods..." + pod install + - name: Resolve Package Dependencies + if: inputs.resolve-package-dependencies == 'true' + shell: bash + run: | + echo "[XCode-Deploy]: Resolving Package Dependencies..." + xcodebuild -resolvePackageDependencies -clonedSourcePackagesDirPath . - name: Setup Scheme shell: bash run: | @@ -112,15 +140,14 @@ runs: - name: Select Xcode uses: maxim-lobanov/setup-xcode@v1.4.1 with: - xcode-version: '14.0' + xcode-version: ${{ inputs.xcode-version }} - name: Increment Build Number shell: bash + if: inputs.update-build == 'true' run: | - if ${{ inputs.update-build }}; then echo "[XCode-Deploy]: Updating Build Number to commit depth..." count=`git rev-list --count HEAD` xcrun agvtool new-version -all $count - fi - name: Build and Archive uses: sersoft-gmbh/xcodebuild-action@v2 with: