Skip to content

Commit

Permalink
chore: build ipa github action
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Nov 28, 2024
1 parent 3e8de5a commit b8927b9
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 46 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/build-ipa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build IPA

on:
workflow_dispatch:
push:
tags:
- 'ipa-v*.*.*'
- 'v*.*.*'
paths-ignore:
- 'README.md'
- 'wiki/**'
- 'public/**'
- 'scripts/**'
- '.vscode'
- '.idea'
pull_request:
branches:
- master
- main
paths-ignore:
- 'README.md'
- 'wiki/**'
- 'public/**'
- '.scripts/**'
- '.vscode'
- '.idea'

jobs:
build:
name: Install and build
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/setup-node@v3
with:
node-version: 22.x
cache: pnpm


- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build tw plugins & scripts
run: |
cd plugins && pnpm i && cd ..
pnpm run build:plugin
pnpm run build:preload
- name: Build IPA
run: expo build:ios --non-interactive --no-publish --type archive
- name: Download IPA
run: curl "$(expo url:ipa --non-interactive)" -o app.ipa

- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
files: app.ipa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 0 additions & 45 deletions .github/workflows/eas-build.yml

This file was deleted.

3 changes: 2 additions & 1 deletion eas.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cli": {
"version": ">= 5.1.0"
"version": ">= 13.4.2",
"appVersionSource": "local"
},
"build": {
"development": {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build:preload": "zx scripts/buildPreload.mjs",
"build:sqlite-migration": "drizzle-kit generate:sqlite",
"build:android-apk": "eas build --profile preview --platform android --non-interactive",
"build:ios-ipa": "eas build --profile preview --platform ios",
"build:expo-sdk": "eas build --profile development --platform android --non-interactive",
"ios": "cross-env NODE_ENV=development expo start --go --ios",
"start": "cross-env NODE_ENV=development expo start",
Expand Down

0 comments on commit b8927b9

Please sign in to comment.