Skip to content

Commit

Permalink
feat(ios,android): setup uniffi infra (#8828)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Dec 10, 2024
1 parent 95597ec commit adc6954
Show file tree
Hide file tree
Showing 26 changed files with 3,096 additions and 123 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/release-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,25 @@ env:
KEYCHAIN_NAME: ${{ github.workspace }}/signing_temp

jobs:
output-env:
runs-on: ubuntu-latest
outputs:
ENVIRONMENT: ${{ steps.env.outputs.ENVIRONMENT }}
steps:
- name: Output Environment
id: env
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "ENVIRONMENT=${{ github.event.inputs.build-type }}" >> $GITHUB_OUTPUT
else
echo "ENVIRONMENT=" >> $GITHUB_OUTPUT
fi
build-ios-web:
needs:
- output-env
runs-on: ubuntu-latest
environment: ${{ inputs.build-type || github.event.inputs.build-type }}
environment: ${{ needs.output-env.outputs.ENVIRONMENT }}
outputs:
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
steps:
Expand Down Expand Up @@ -71,7 +87,9 @@ jobs:

build-android-web:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.build-type || inputs.build-type }}
needs:
- output-env
environment: ${{ needs.output-env.outputs.ENVIRONMENT }}
outputs:
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
steps:
Expand Down Expand Up @@ -132,6 +150,10 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
targets: 'aarch64-apple-ios'
- name: Testflight
if: ${{ env.BUILD_TYPE != 'stable' }}
working-directory: packages/frontend/apps/ios/App
Expand Down Expand Up @@ -169,8 +191,15 @@ jobs:
electron-install: false
hard-link-nm: false
enableScripts: false
- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
targets: 'aarch64-linux-android'
- name: Cap sync
run: yarn workspace @affine/android cap sync
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Auth gcloud
id: auth
uses: google-github-actions/auth@v2
Expand All @@ -185,6 +214,7 @@ jobs:
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Auto increment version code
id: bump
if: ${{ env.BUILD_TARGET == 'distribution' }}
Expand All @@ -199,6 +229,7 @@ jobs:
AFFINE_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.AFFINE_ANDROID_KEYSTORE_PASSWORD }}
AFFINE_ANDROID_KEYSTORE_ALIAS_PASSWORD: ${{ secrets.AFFINE_ANDROID_KEYSTORE_ALIAS_PASSWORD }}
AFFINE_ANDROID_SIGN_KEYSTORE: ${{ secrets.AFFINE_ANDROID_SIGN_KEYSTORE }}

- name: Upload to Google Play
uses: r0adkll/upload-google-play@v1
if: ${{ env.BUILD_TARGET == 'distribution' }}
Expand Down
Loading

0 comments on commit adc6954

Please sign in to comment.