-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(android): android internal testing
- Loading branch information
1 parent
542fde6
commit 614d010
Showing
6 changed files
with
110 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,39 @@ jobs: | |
with: | ||
name: ios | ||
path: packages/frontend/apps/ios/dist | ||
|
||
build-android-web: | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.event.inputs.build-type || inputs.build-type }} | ||
outputs: | ||
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Version | ||
id: version | ||
uses: ./.github/actions/setup-version | ||
- name: Setup Node.js | ||
uses: ./.github/actions/setup-node | ||
- name: Setup @sentry/cli | ||
uses: ./.github/actions/setup-sentry | ||
- name: Build Mobile | ||
run: yarn nx build @affine/android --skip-nx-cache | ||
env: | ||
PUBLIC_PATH: '/' | ||
MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: 'affine' | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | ||
SENTRY_RELEASE: ${{ steps.version.outputs.APP_VERSION }} | ||
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }} | ||
SKIP_NX_CACHE: 'true' | ||
- name: Upload android artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: android | ||
path: packages/frontend/apps/android/dist | ||
|
||
ios: | ||
runs-on: macos-latest | ||
needs: | ||
|
@@ -115,3 +148,63 @@ jobs: | |
APPLE_STORE_CONNECT_API_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_API_KEY_ID }} | ||
APPLE_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APPLE_STORE_CONNECT_API_ISSUER_ID }} | ||
APPLE_STORE_CONNECT_API_KEY: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }} | ||
|
||
android: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: 'write' | ||
needs: | ||
- build-android-web | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download mobile artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: android | ||
path: packages/frontend/apps/android/dist | ||
- name: Setup Node.js | ||
uses: ./.github/actions/setup-node | ||
timeout-minutes: 10 | ||
with: | ||
extra-flags: workspaces focus @affine/android | ||
playwright-install: false | ||
electron-install: false | ||
hard-link-nm: false | ||
enableScripts: false | ||
- name: Cap sync | ||
run: yarn workspace @affine/android cap sync | ||
- name: Auth gcloud | ||
id: auth | ||
uses: google-github-actions/auth@v2 | ||
if: ${{ github.event.inputs.build-target == 'distribution' }} || ${{ inputs.build-target == 'distribution' }} | ||
with: | ||
workload_identity_provider: 'projects/${{ secrets.GCP_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions-helm-deploy' | ||
service_account: '${{ secrets.GCP_HELM_DEPLOY_SERVICE_ACCOUNT }}' | ||
token_format: 'access_token' | ||
project_id: '${{ secrets.GCP_PROJECT_ID }}' | ||
id_token_include_email: true | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- uses: lukasa1993/[email protected] | ||
if: ${{ github.event.inputs.build-target == 'distribution' }} || ${{ inputs.build-target == 'distribution' }} | ||
with: | ||
serviceAccountJson: ${{ steps.auth.outputs.credentials_file_path }} | ||
packageName: app.affine.pro | ||
- name: Build | ||
run: | | ||
echo -n "${{ env.AFFINE_ANDROID_SIGN_KEYSTORE }}" | base64 --decode > packages/frontend/apps/android/affine.keystore | ||
yarn workspace @affine/android cap build android | ||
env: | ||
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: ${{ github.event.inputs.build-target == 'distribution' }} || ${{ inputs.build-target == 'distribution' }} | ||
with: | ||
serviceAccountJson: ${{ steps.auth.outputs.credentials_file_path }} | ||
packageName: app.affine.pro | ||
releaseFiles: packages/frontend/apps/android/App/app/build/outputs/bundle/release/app-release-signed.aab | ||
track: internal |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ App/**/*.p8 | |
*.zip | ||
*.cer | ||
App/fastlane/report.xml | ||
affine.keystore |
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
2 changes: 1 addition & 1 deletion
2
packages/frontend/apps/android/App/gradle/wrapper/gradle-wrapper.properties
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
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