Skip to content

Instantly share code, notes, and snippets.

@UHKim

UHKim/example.ios.yml

Last active Jul 17, 2021
Embed
What would you like to do?
GitHub Action iOS build workflow example
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: "12.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/actions-setup-keychain@v1.0
- 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