-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from sparkfabrik/feature/fastlane_build_redesign
Redesign the Fastlane build using Match
- Loading branch information
Showing
11 changed files
with
889 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Change Log | ||
|
||
## [2.0.0] - 2022-10-06 | ||
|
||
Redesign of the Fastlane build and certificate handling. | ||
|
||
### Breaking | ||
|
||
- This version uses `Match` so you cannot use base64 version of the certificates, instead you need to have a GitHub repo that match will use to store the certificates and an Apple app key. Follow the README to see the new parameters list. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,93 @@ | ||
# Build iOS App | ||
|
||
This action builds your iOS project (`.xcodeproj`, `.xcworkspace`) and exports the resulting `.ipa` file as GitHub artifact, with optional automatic upload to BrowserStack AppLive. | ||
This action builds your iOS project (`.xcodeproj`, `.xcworkspace`) and can export the resulting `.ipa` file as GitHub artifact, with optional automatic upload to BrowserStack AppLive, and optional signed production build with App Store upload. | ||
|
||
Tested with Ionic, React Native and native ios projects. | ||
|
||
Originally forked from `yukiarrr/ios-build-action`. | ||
## WARNING v2 has breaking changes and it will break your non-pinned Actions! | ||
|
||
## Inputs | ||
To keep the old behavior please use the `v1` version. | ||
`v2` uses `Match` to simplify and strenghten the certificates management, and can optionally upload the build to the App Store. | ||
|
||
You can add a single p12 key+cert file with `p12-base64`, or if you have key and cert in separate files | ||
you can add them with `p12-key-base64` and `p12-cer-base64`. One of the two options is required. | ||
## Inputs | ||
|
||
### `project-path` | ||
|
||
**Required** .xcodeproj path. | ||
|
||
### `p12-base64` | ||
### `workspace-path` | ||
|
||
**Required if single file**: Base64 encoded p12 file (key + cert). | ||
.xcworkspace path. Default `""`. | ||
|
||
### `p12-key-base64` | ||
### `export-method` | ||
|
||
**Required if split key/cert**: Base64 encoded p12 key file. | ||
Choose app-store, `"ad-hoc"`, `"package"` `"enterprise"`, `"development"`, or `"developer-id"`. Default `"app-store"`. | ||
|
||
### `p12-cer-base64` | ||
### `configuration` | ||
|
||
**Required if split key/cert**: Base64 encoded certificate for the p12 key. | ||
For example, `"Debug"`, `"Release"`. Default `"Release"`. | ||
|
||
### `mobileprovision-base64` | ||
### `scheme` | ||
|
||
**Required** Base64 encoded mobileprovision file. | ||
For example, `MyScheme`. | ||
|
||
### `code-signing-identity` | ||
### `output-path` | ||
|
||
**Required** For example, `"iOS Distribution"`. | ||
Output path of ipa. Default `"output.ipa"`. | ||
|
||
### `team-id` | ||
|
||
**Required** Team id. | ||
|
||
### `workspace-path` | ||
### `team-name` | ||
|
||
.xcworkspace path. Default `""`. | ||
**Required** Team name. | ||
|
||
### `export-method` | ||
### `build-pods` | ||
|
||
Choose app-store, `"ad-hoc"`, `"package"` `"enterprise"`, `"development"`, or `"developer-id"`. Default `"app-store"`. | ||
Run the `pod install` command during the build (boolean) | ||
|
||
### `configuration` | ||
### `pods-path` | ||
|
||
For example, `"Debug"`, `"Release"`. Default `"Release"`. | ||
The path to the Podfile. Default `"Podfile"` | ||
|
||
### `scheme` | ||
### `upload-to-testflight` | ||
|
||
For example, `"myscheme"`. | ||
Upload the build to the App Store (boolean) | ||
|
||
### `certificate-password` | ||
### `increment-build-number` | ||
|
||
Certificate password. Default `""`. | ||
Automatically increment the latest build number from TestFlight by one (boolean) | ||
|
||
### `output-path` | ||
### `apple-key-id` | ||
|
||
Output path of ipa. Default `"output.ipa"`. | ||
The Apple Key ID | ||
|
||
### `update-targets` | ||
### `apple-key-issuer-id` | ||
|
||
Targets to be updated with mobileprovision, code signing identity, etc. Split on new lines. Default `""`. (default to all targets) | ||
The Apple Key Issuer ID | ||
|
||
```yaml | ||
- uses: sparkfabrik/[email protected] | ||
with: | ||
update-targets: | | ||
MyApp | ||
YourApp | ||
``` | ||
### `apple-key-content` | ||
|
||
### `disable-targets` | ||
The Apple Key content | ||
|
||
These targets will not use automatic code signing and instead use the identity specified in other inputs. Input targets separated by ','. For example, 'MyApp,YourApp'. Default "". (default to all targets) | ||
### `match-git-url` | ||
|
||
### `build-pods` | ||
The GitHub repo URL for storing Match certificates. | ||
See https://docs.fastlane.tools/actions/match/ | ||
|
||
Run the `pod install` command during the build. | ||
### `match-git-basic-authorization` | ||
|
||
### `pods-path` | ||
base64 key to the repo. | ||
Generate it with `echo -n your_github_username:your_personal_access_token | base64` | ||
|
||
The path to the Podfile. Default `"Podfile"` | ||
### `match-password` | ||
|
||
The password to decrypt the certificates. | ||
|
||
### `match-build-type` | ||
|
||
The Match build type (eg. "development") | ||
|
||
### `browserstack-upload` | ||
|
||
|
@@ -106,31 +108,31 @@ Browserstack access key (**required if** browserstack-upload == true) | |
If you have any other inputs you'd like to add, feel free to create PR. | ||
Remember to run `yarn install` and `yarn bundle` if you make changes to the `index.js`. | ||
|
||
## Example usage | ||
|
||
### single p12 | ||
|
||
```yaml | ||
- uses: sparkfabrik/[email protected] | ||
with: | ||
project-path: App.xcodeproj | ||
p12-base64: ${{ secrets.P12_BASE64 }} | ||
mobileprovision-base64: ${{ secrets.MOBILEPROVISION_BASE64 }} | ||
code-signing-identity: ${{ secrets.CODE_SIGNING_IDENTITY }} | ||
team-id: ${{ secrets.TEAM_ID }} | ||
workspace-path: App.xcworkspace # optional | ||
``` | ||
|
||
### key and cert | ||
## Example usage with a production build uploaded to App Store | ||
|
||
```yaml | ||
- uses: sparkfabrik/ios-build-action@v1.2.0 | ||
- uses: sparkfabrik/ios-build-action@v2 | ||
with: | ||
project-path: App.xcodeproj | ||
p12-key-base64: ${{ secrets.P12_KEY_BASE64 }} | ||
p12-cer-base64: ${{ secrets.P12_CER_BASE64 }} | ||
mobileprovision-base64: ${{ secrets.MOBILEPROVISION_BASE64 }} | ||
code-signing-identity: ${{ secrets.CODE_SIGNING_IDENTITY }} | ||
upload-to-testflight: true | ||
increment-build-number: true | ||
build-pods: true | ||
pods-path: 'ios/Podfile' | ||
configuration: Release | ||
export-method: app-store | ||
workspace-path: ${{ secrets.WORKSPACE_PATH }} | ||
project-path: ${{ secrets.PROJECT_PATH }} | ||
scheme: MyScheme | ||
output-path: build-${{ github.sha }}.ipa | ||
apple-key-id: ${{ secrets.APPLE_KEY_ID }} | ||
apple-key-issuer-id: ${{ secrets.APPLE_KEY_ISSUER_ID }} | ||
apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} | ||
team-id: ${{ secrets.TEAM_ID }} | ||
workspace-path: App.xcworkspace # optional | ||
team-name: ${{ secrets.TEAM_NAME }} | ||
match-password: ${{ secrets.MATCH_PASSWORD }} | ||
match-git-url: ${{ secrets.MATCH_GIT_URL }} | ||
match-git-basic-authorization: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | ||
match-build-type: 'appstore' | ||
browserstack-upload: true | ||
browserstack-username: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
browserstack-access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.