Skip to content

Commit

Permalink
fix ci job
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Oct 18, 2024
1 parent 2d19f74 commit d7d701e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ jobs:
test-build-ios:
uses: ./.github/workflows/release-mobile.yml
with:
build-type: canary
build-target: development

test-done:
Expand Down
35 changes: 20 additions & 15 deletions .github/workflows/release-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
type: string
required: true
default: development
build-type:
description: 'Build Type'
type: string
required: true
default: canary
workflow_dispatch:
inputs:
build-target:
Expand All @@ -28,14 +33,14 @@ on:
- beta
- stable
env:
BUILD_TYPE: ${{ github.event.inputs.build-type }}
BUILD_TYPE: ${{ github.event.inputs.build-type || inputs.build-type }}
DEBUG: napi:*
KEYCHAIN_NAME: ${{ github.workspace }}/signing_temp

jobs:
build-mobile-web:
build-ios-web:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.build-type }}
environment: ${{ github.event.inputs.build-type || inputs.build-type }}
outputs:
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
steps:
Expand All @@ -48,7 +53,7 @@ jobs:
- name: Setup @sentry/cli
uses: ./.github/actions/setup-sentry
- name: Build Mobile
run: yarn nx build @affine/mobile --skip-nx-cache
run: yarn nx build @affine/ios --skip-nx-cache
env:
PUBLIC_PATH: '/'
MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }}
Expand All @@ -59,33 +64,33 @@ jobs:
SENTRY_RELEASE: ${{ steps.version.outputs.APP_VERSION }}
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
SKIP_NX_CACHE: 'true'
- name: Upload mobile artifact
- name: Upload ios artifact
uses: actions/upload-artifact@v4
with:
name: mobile
path: packages/frontend/apps/mobile/dist
name: ios
path: packages/frontend/apps/ios/dist
ios:
runs-on: macos-latest
needs:
- build-mobile-web
- build-ios-web
steps:
- uses: actions/checkout@v4
- name: Download mobile artifact
uses: actions/download-artifact@v4
with:
name: mobile
path: packages/frontend/apps/mobile/dist
name: ios
path: packages/frontend/apps/ios/dist
- name: Setup Node.js
uses: ./.github/actions/setup-node
timeout-minutes: 10
with:
extra-flags: workspaces focus @affine/mobile
extra-flags: workspaces focus @affine/ios
playwright-install: false
electron-install: false
hard-link-nm: false
enableScripts: false
- name: Cap sync
run: yarn workspace @affine/mobile cap sync
run: yarn workspace @affine/ios cap sync
- name: Signing By Apple Developer ID
uses: apple-actions/import-codesign-certs@v3
id: import-codesign-certs
Expand All @@ -96,15 +101,15 @@ jobs:
with:
xcode-version: latest-stable
- name: Testflight
if: ${{ github.event.inputs.build-type }} != 'stable'
working-directory: packages/frontend/apps/mobile/ios/App
if: ${{ github.event.inputs.build-type || inputs.build-type }} != 'stable'
working-directory: packages/frontend/apps/ios/App
run: |
echo -n "${{ env.BUILD_PROVISION_PROFILE }}" | base64 --decode -o $PP_PATH
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
fastlane beta
env:
BUILD_TARGET: ${{ github.event.inputs.build-target }}
BUILD_TARGET: ${{ github.event.inputs.build-target || inputs.build-target }}
BUILD_PROVISION_PROFILE: ${{ secrets.BUILD_PROVISION_PROFILE }}
PP_PATH: ${{ runner.temp }}/build_pp.mobileprovision
APPLE_STORE_CONNECT_API_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_API_KEY_ID }}
Expand Down

0 comments on commit d7d701e

Please sign in to comment.