Last active
August 10, 2021 04:28
-
-
Save brunocarvalhodearaujo/3837796ead85afc365b27b0b4c633a15 to your computer and use it in GitHub Desktop.
build android and iOS release on expo
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: Expo Publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
name: Install and publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- uses: expo/expo-github-action@v6 | |
with: | |
expo-version: 4.x | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
- name: Validate code with standardJS | |
run: npm run lint | |
- name: Publish on expo stable release channel | |
run: expo publish --quiet | |
- name: Publish on expo branch release channel | |
run: expo publish --quiet --release-channel=${GITHUB_REF#refs/*/} | |
- name: Build iOS version | |
run: expo build:ios --non-interactive --skip-credentials-check --apple-id $APPLE_ID --team-id $APPLE_TEAM_ID --type archive | |
env: | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
- name: Build Android version | |
run: expo build:android --type apk | |
- name: Download iOS ipa file | |
run: curl -o $PROJECT_NAME-${GITHUB_REF#refs/*/}.ipa "$(npx expo url:ipa --non-interactive)" || echo skip | |
env: | |
PROJECT_NAME: ${{ github.event.repository.name }} | |
- name: Download Android file | |
run: curl -o $PROJECT_NAME-${GITHUB_REF#refs/*/}.apk "$(npx expo url:apk --non-interactive)" || echo skip | |
env: | |
PROJECT_NAME: ${{ github.event.repository.name }} | |
- name: Upload iOS and Android release to GitHub version | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "*.ipa,*.apk,*.app-bundle" | |
token: ${{ secrets.GH_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment