expo-github-action icon indicating copy to clipboard operation
expo-github-action copied to clipboard

running expo build for iOS

Open zivl opened this issue 3 years ago • 5 comments

assuming the flow in which expo is taking care of the entire signature and provisioning stuff for you do you have an example of how to create an expo build:ios -t archive flow, which having the Apple Connect user/pass?

zivl avatar Oct 11 '20 07:10 zivl

Hi @zivl! That should be possible by using environment variables! Based on the envvars used here and the options from the command itself, it should look something like:

name: Build Archive
on:
  push:
    branches:
      - master
jobs:
  publish:
    name: Install and build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - uses: expo/expo-github-action@v5
        with:
          expo-version: 3.x
          expo-token: ${{ secrets.EXPO_TOKEN }}
      - run: yarn install
      - run: expo build:ios --no-wait --type archive
        env:
          EXPO_APPLE_ID: ${{ secrets.APPLE_ID }}
          EXPO_APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}

You can play around with the options you provide to expo build:ios, but the env vars should be enough for you to authenticate. If you have more commands depending on the build or if you want to reflect the GH Action status on a successful build, you can omit --no-wait ofc.

Can you try this out? I'll add it to the readme if that works as expected 😄

byCedric avatar Oct 20 '20 15:10 byCedric

@byCedric thanks for the detailed example, yet, Apple uses TFA so I'm afraid appleId and password won't be enough. but I will try this out, as I think the TFA is being used only for the first time of generating the keys/certificates...

zivl avatar Oct 20 '20 19:10 zivl

Ah, you are right! I think that would make any "first time builds" close to impossible, since these TFA codes changes. You'd have to build at least 1 time locally, so you can authenticate with Apple and setup the certificates in advance. After that, you should be able to run the expo build:ios without Apple credentials, right?

Does that help your use case in any way?

byCedric avatar Oct 21 '20 12:10 byCedric

@byCedric It did work! Amazing! 🍺

zivl avatar Nov 14 '20 19:11 zivl

@byCedric I think this issue can be closed, unless you wanna keep it open to grab some documentation out of it

zivl avatar Nov 15 '20 07:11 zivl