merge gh workflows #1
Workflow file for this run
This file contains 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
on: | |
workflow_dispatch: | |
push: | |
name: Build apk | |
jobs: | |
build-apk: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Setup repo | |
uses: actions/checkout@v3 | |
- name: π Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: π Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
cache: pnpm | |
- name: π Setup EAS | |
uses: expo/expo-github-action@v8 | |
with: | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
packager: pnpm | |
- name: π Setup Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" | |
java-version: "17" | |
- name: π¦ Install dependencies | |
run: pnpm install | |
- name: π Build app | |
run: eas build --local --non-interactive --platform android --profile production | |
env: | |
EXPO_PUBLIC_API_URL: ${{ secrets.API_URL }} | |
EXPO_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }} | |
EXPO_PUBLIC_POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }} | |
EXPO_PUBLIC_POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | |
- name: Upload Artifact GitHub Action | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vshop_apk | |
path: build-*.apk | |
build-ipa: | |
runs-on: macos-14 | |
steps: | |
- name: π Setup repo | |
uses: actions/checkout@v3 | |
- name: π Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: π Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
cache: pnpm | |
- name: π Setup EAS | |
uses: expo/expo-github-action@v8 | |
with: | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
packager: pnpm | |
- name: π¦ Install dependencies | |
run: pnpm install | |
- name: π¦ Expo prebuild | |
run: pnpm prebuild:ios | |
- name: π Create .env | |
run: | | |
touch .env | |
echo API_URL=${{ secrets.API_URL }} >> .env | |
echo STRIPE_PUBLIC_KEY=${{ secrets.STRIPE_PUBLIC_KEY }} >> .env | |
- name: Build Archive | |
run: | | |
cd ios | |
xcodebuild archive -workspace VShop.xcworkspace -scheme VShop -sdk iphoneos -archivePath output.xcarchive -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Create IPA from Archive | |
run: | | |
cp -r ios/output.xcarchive/Products/Applications/ Payload/ | |
zip -r vshop.ipa Payload/ | |
- uses: actions/upload-artifact@v3 | |
name: Upload IPA | |
with: | |
name: vshop_ipa | |
path: vshop.ipa |