Skip to content

Commit

Permalink
ci: eas deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarkhanzadian committed Sep 20, 2024
1 parent a5b7e40 commit a9f8491
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 29 deletions.
34 changes: 34 additions & 0 deletions .github/actions/eas-deploy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: EAS deploy
description: Run EAS deploy
runs:
using: 'composite'
steps:
- uses: actions/checkout@v4
- name: Prepare the app
uses: ./.github/actions/provision
- name: Setup Expo and EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install jq tool
run: |
sudo apt-get update
sudo apt-get install jq
- name: Setup eas credentials
run: |
echo $(jq --arg APPLE_ID "$APPLE_ID" '.submit.production.ios.appleId = $APPLE_ID' ./apps/mobile/eas.json) > ./apps/mobile/eas.json
echo $(jq --arg ASC_APP_ID "$ASC_APP_ID" '.submit.production.ios.ascAppId = $ASC_APP_ID' ./apps/mobile/eas.json) > ./apps/mobile/eas.json
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
ASC_APP_ID: ${{ secrets.ASC_APP_ID }}
# Wait for build to either succeed or fail
- name: 🛫 Prepare for takeoff! 🛫
run: |
cd apps/mobile
# No wait on simulator version build of the app
eas build --platform ios --profile=simulator --non-interactive --no-wait
# Release version of the app, we should wait for it to see the result
eas build --platform ios --profile=production --non-interactive --auto-submit
env:
EXPO_APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.EXPO_APPLE_APP_SPECIFIC_PASSWORD }}
18 changes: 18 additions & 0 deletions .github/workflows/eas-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
pull-requests:
types: [labeled]

permissions:
contents: write
pull-requests: write

name: trigger EAS deploy

jobs:
deploy-eas:
if: ${{ github.event.label.name == 'test:deploy' }}
runs-on: ubuntu-latest
# Ensure we only publish if a new release was created
if: needs.release-please.outputs.releases_created
steps:
- uses: ./.github/actions/eas-deploy
30 changes: 1 addition & 29 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,32 +76,4 @@ jobs:
# Ensure we only publish if a new release was created
if: needs.release-please.outputs.releases_created
steps:
- uses: actions/checkout@v4
- name: Prepare the app
uses: ./.github/actions/provision
- name: Setup Expo and EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install jq tool
run: |
sudo apt-get update
sudo apt-get install jq
- name: Setup eas credentials
run: |
echo $(jq --arg APPLE_ID "$APPLE_ID" '.submit.production.ios.appleId = $APPLE_ID' ./apps/mobile/eas.json) > ./apps/mobile/eas.json
echo $(jq --arg ASC_APP_ID "$ASC_APP_ID" '.submit.production.ios.ascAppId = $ASC_APP_ID' ./apps/mobile/eas.json) > ./apps/mobile/eas.json
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
ASC_APP_ID: ${{ secrets.ASC_APP_ID }}
# Wait for build to either succeed or fail
- name: 🛫 Prepare for takeoff! 🛫
run: |
cd apps/mobile
# No wait on simulator version build of the app
eas build --platform ios --profile=simulator --non-interactive --no-wait
# Release version of the app, we should wait for it to see the result
eas build --platform ios --profile=production --non-interactive --auto-submit
env:
EXPO_APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.EXPO_APPLE_APP_SPECIFIC_PASSWORD }}
- uses: ./.github/actions/eas-deploy

0 comments on commit a9f8491

Please sign in to comment.