Last active
July 17, 2023 03:43
-
-
Save WoonHaKim/e284781c985799e39848bf9863337b9c to your computer and use it in GitHub Desktop.
GitHub Action iOS build workflow example
This file contains hidden or 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
name: Example iOS Build | |
on: | |
push: | |
branches: | |
- development | |
jobs: | |
build-ios: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: configure node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "14.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: configure ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6 | |
- name: create macos keychain | |
uses: sinoru/[email protected] | |
- name: install fastlane & plugins | |
run: bundle install | |
- name: homebrew & watchman | |
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" && brew update && brew install watchman | |
- name: yarn install | |
run: yarn install | |
- name: re-pod | |
run: cd ios && pod deintegrate && pod install && cd .. | |
- name: fastlane build | |
run: fastlane ios adhoc build | |
# upload failure log if fails | |
- uses: actions/upload-artifact@v1 | |
name: upload failure fastlane build log | |
if: failure() | |
with: | |
name: App-App.log | |
path: /Users/runner/Library/Logs/gym/ App-App.log | |
- name: Make Artefact | |
run: | | |
zip artefact.zip App.ipa App.app.dSYM.zip | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: artefact.zip | |
path: ./artefact.zip | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload Beta Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artefact.zip | |
asset_name: artefact.zip | |
asset_content_type: application/zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MATCH_GIT_ACCOUNT: ${{secrets.MATCH_GIT_ACCOUNT}} | |
MATCH_GIT_BASIC_AUTHORIZATION_USER: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION_USER }} | |
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | |
MATCH_CERT_REPO: ${{secrets.MATCH_CERT_REPO}} | |
MATCH_PASSWORD: ${{secrets.MATCH_PASSWORD}} # Match Decrypting Password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment