Skip to content

Instantly share code, notes, and snippets.

@bacongravy
Last active October 31, 2020 19:02
Show Gist options
  • Save bacongravy/ca773d7f12b2675ea9e2a34a09eefa64 to your computer and use it in GitHub Desktop.
Save bacongravy/ca773d7f12b2675ea9e2a34a09eefa64 to your computer and use it in GitHub Desktop.
name: deploy
on:
push:
branches: [ master ]
tags: [ v* ]
jobs:
deploy:
runs-on: macos-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Set environment variables from project settings
run: |
exec .github/scripts/set-env-from-xcodeproj.sh
- name: Import signing certificate
env:
SIGNING_CERTIFICATE_P12_DATA: ${{ secrets.SIGNING_CERTIFICATE_P12_DATA }}
SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }}
run: |
exec .github/scripts/import-certificate.sh
- name: Import provisioning profile
env:
PROVISIONING_PROFILE_DATA: ${{ secrets.PROVISIONING_PROFILE_DATA }}
run: |
exec .github/scripts/import-profile.sh
- name: Build app
run: |
fastlane run build_app
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: build.log
path: ~/Library/Logs/gym/*.log
- name: Upload release assets
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.PRODUCT_NAME }}.ipa
${{ env.PRODUCT_NAME }}.app.dSYM.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload app to App Store Connect
if: startsWith(github.ref, 'refs/tags/v')
env:
APP_STORE_CONNECT_USERNAME: ${{ secrets.APP_STORE_CONNECT_USERNAME }}
APP_STORE_CONNECT_PASSWORD: ${{ secrets.APP_STORE_CONNECT_PASSWORD }}
run: |
xcrun altool --upload-app -t ios -f "$PRODUCT_NAME.ipa" -u "$APP_STORE_CONNECT_USERNAME" -p "$APP_STORE_CONNECT_PASSWORD"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment