-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate workflows into build and deploy sections
- Loading branch information
1 parent
0593765
commit 3306a3b
Showing
3 changed files
with
35 additions
and
64 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
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,10 +1,9 @@ | ||
name: 📱 iOS CI/CD | ||
name: iOS | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
if: startsWith(github.ref, 'refs/tags/') != true | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
|
@@ -29,55 +28,38 @@ jobs: | |
with: | ||
project-path: ${{ github.workspace }}/ios/MultiCash.xcodeproj | ||
workspace-path: ${{ github.workspace }}/ios/MultiCash.xcworkspace | ||
output-path: ${{ github.workspace }}/ios/app-release.ipa | ||
p12-base64: ${{ secrets.IOS_P12_BASE64 }} | ||
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} | ||
mobileprovision-base64: ${{ secrets.IOS_MOBILEPROVISION_BASE64 }} | ||
code-signing-identity: ${{ secrets.IOS_CODE_SIGNING_IDENTITY }} | ||
team-id: ${{ secrets.IOS_TEAM_ID }} | ||
export-method: package | ||
configuration: Debug | ||
export-method: app-store | ||
configuration: Release | ||
scheme: MultiCash | ||
- name: Upload Release Artifact | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: iOS-release | ||
path: ${{ github.workspace }}/ios/app-release.ipa | ||
|
||
deploy: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: build | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Cache modules | ||
uses: actions/cache@v2 | ||
- name: Download Release Artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: ${{ github.workspace }}/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
- name: Install Yarn Modules | ||
run: yarn | ||
- name: Install iOS Cocoa Pods | ||
run: pod install | ||
working-directory: ios | ||
- name: Build with Fastlane | ||
uses: yukiarrr/[email protected] | ||
with: | ||
project-path: ${{ github.workspace }}/ios/MultiCash.xcodeproj | ||
workspace-path: ${{ github.workspace }}/ios/MultiCash.xcworkspace | ||
output-path: ${{ github.workspace }}/ios/app-release.ipa | ||
p12-base64: ${{ secrets.IOS_P12_BASE64 }} | ||
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} | ||
mobileprovision-base64: ${{ secrets.IOS_MOBILEPROVISION_BASE64 }} | ||
code-signing-identity: ${{ secrets.IOS_CODE_SIGNING_IDENTITY }} | ||
team-id: ${{ secrets.IOS_TEAM_ID }} | ||
export-method: app-store | ||
configuration: Release | ||
scheme: MultiCash | ||
name: iOS-release | ||
- name: Upload to App Store Connect | ||
run: | | ||
xcrun altool --upload-app -t ios -f "${{ github.workspace }}/ios/app-release.ipa" -u "${{ secrets.IOS_UPLOAD_USER }}" -p "${{ secrets.IOS_UPLOAD_PASSWORD }}" | ||
xcrun altool --upload-app -t ios -f "${{ github.workspace }}/app-release.ipa" -u "${{ secrets.IOS_UPLOAD_USER }}" -p "${{ secrets.IOS_UPLOAD_PASSWORD }}" | ||
- name: Upload Release to GitHub | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ github.workspace }}/ios/app-release.ipa | ||
files: ${{ github.workspace }}/app-release.ipa | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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