mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-03 02:20:19 +08:00
1f58173800
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://redirect.github.com/actions/checkout) | action | major | `v6` → `v7` | --- ### Release Notes <details> <summary>actions/checkout (actions/checkout)</summary> ### [`v7.0.1`](https://redirect.github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v701) [Compare Source](https://redirect.github.com/actions/checkout/compare/v7.0.0...v7.0.1) - Bump github/codeql-action from 3 to 4 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2475](https://redirect.github.com/actions/checkout/pull/2475) - Bump actions/setup-node from 4 to 6 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2477](https://redirect.github.com/actions/checkout/pull/2477) - Bump docker/build-push-action from 6.5.0 to 7.2.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2478](https://redirect.github.com/actions/checkout/pull/2478) - Bump docker/login-action from 3.3.0 to 4.2.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2479](https://redirect.github.com/actions/checkout/pull/2479) - Bump actions/checkout from 6 to 7 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2488](https://redirect.github.com/actions/checkout/pull/2488) - Bump actions/upload-artifact from 4 to 7 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2476](https://redirect.github.com/actions/checkout/pull/2476) - eslint 9 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2474](https://redirect.github.com/actions/checkout/pull/2474) - Bump the minor-actions-dependencies group with 2 updates by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2499](https://redirect.github.com/actions/checkout/pull/2499) - skip running unsafe pr check if input is default by [@​aiqiaoy](https://redirect.github.com/aiqiaoy) in [#​2518](https://redirect.github.com/actions/checkout/pull/2518) - trim only ascii whitespace for branch by [@​aiqiaoy](https://redirect.github.com/aiqiaoy) in [#​2521](https://redirect.github.com/actions/checkout/pull/2521) - escape values passed to --unset by [@​aiqiaoy](https://redirect.github.com/aiqiaoy) in [#​2530](https://redirect.github.com/actions/checkout/pull/2530) ### [`v7.0.0`](https://redirect.github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700) [Compare Source](https://redirect.github.com/actions/checkout/compare/v7.0.0...v7.0.0) - Block checking out fork PR for pull\_request\_target and workflow\_run by [@​aiqiaoy](https://redirect.github.com/aiqiaoy) in [#​2454](https://redirect.github.com/actions/checkout/pull/2454) - Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2458](https://redirect.github.com/actions/checkout/pull/2458) - Bump flatted from 3.3.1 to 3.4.2 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2460](https://redirect.github.com/actions/checkout/pull/2460) - Bump js-yaml from 4.1.0 to 4.2.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2461](https://redirect.github.com/actions/checkout/pull/2461) - Bump [@​actions/core](https://redirect.github.com/actions/core) and [@​actions/tool-cache](https://redirect.github.com/actions/tool-cache) and Remove uuid by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2459](https://redirect.github.com/actions/checkout/pull/2459) - upgrade module to esm and update dependencies by [@​aiqiaoy](https://redirect.github.com/aiqiaoy) in [#​2463](https://redirect.github.com/actions/checkout/pull/2463) - Bump the minor-npm-dependencies group across 1 directory with 3 updates by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2462](https://redirect.github.com/actions/checkout/pull/2462) ### [`v7`](https://redirect.github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700) [Compare Source](https://redirect.github.com/actions/checkout/compare/v6.1.0...v7.0.0) - Block checking out fork PR for pull\_request\_target and workflow\_run by [@​aiqiaoy](https://redirect.github.com/aiqiaoy) in [#​2454](https://redirect.github.com/actions/checkout/pull/2454) - Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2458](https://redirect.github.com/actions/checkout/pull/2458) - Bump flatted from 3.3.1 to 3.4.2 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2460](https://redirect.github.com/actions/checkout/pull/2460) - Bump js-yaml from 4.1.0 to 4.2.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2461](https://redirect.github.com/actions/checkout/pull/2461) - Bump [@​actions/core](https://redirect.github.com/actions/core) and [@​actions/tool-cache](https://redirect.github.com/actions/tool-cache) and Remove uuid by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2459](https://redirect.github.com/actions/checkout/pull/2459) - upgrade module to esm and update dependencies by [@​aiqiaoy](https://redirect.github.com/aiqiaoy) in [#​2463](https://redirect.github.com/actions/checkout/pull/2463) - Bump the minor-npm-dependencies group across 1 directory with 3 updates by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​2462](https://redirect.github.com/actions/checkout/pull/2462) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zLjIiLCJ1cGRhdGVkSW5WZXIiOiI0NC4zLjIiLCJ0YXJnZXRCcmFuY2giOiJjYW5hcnkiLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
229 lines
8.2 KiB
YAML
229 lines
8.2 KiB
YAML
name: Release Mobile
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
app-version:
|
|
type: string
|
|
required: true
|
|
git-short-hash:
|
|
type: string
|
|
required: true
|
|
build-type:
|
|
type: string
|
|
required: true
|
|
ios-app-version:
|
|
type: string
|
|
required: false
|
|
|
|
env:
|
|
BUILD_TYPE: ${{ inputs.build-type }}
|
|
DEBUG: napi:*
|
|
KEYCHAIN_NAME: ${{ github.workspace }}/signing_temp
|
|
|
|
jobs:
|
|
build-ios-web:
|
|
runs-on: ubuntu-latest
|
|
environment: ${{ inputs.build-type }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Setup Version
|
|
uses: ./.github/actions/setup-version
|
|
with:
|
|
app-version: ${{ inputs.app-version }}
|
|
- name: Setup Node.js
|
|
uses: ./.github/actions/setup-node
|
|
- name: Setup @sentry/cli
|
|
uses: ./.github/actions/setup-sentry
|
|
- name: Build Mobile
|
|
run: yarn affine @affine/ios build
|
|
env:
|
|
PUBLIC_PATH: '/'
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
SENTRY_PROJECT: 'affine'
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
|
SENTRY_RELEASE: ${{ inputs.app-version }}
|
|
RELEASE_VERSION: ${{ inputs.app-version }}
|
|
- name: Upload ios artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ios
|
|
path: packages/frontend/apps/ios/dist
|
|
|
|
build-android-web:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Setup Version
|
|
uses: ./.github/actions/setup-version
|
|
with:
|
|
app-version: ${{ inputs.app-version }}
|
|
- name: Setup Node.js
|
|
uses: ./.github/actions/setup-node
|
|
- name: Setup @sentry/cli
|
|
uses: ./.github/actions/setup-sentry
|
|
- name: Build Mobile
|
|
run: yarn affine @affine/android build
|
|
env:
|
|
PUBLIC_PATH: '/'
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
SENTRY_PROJECT: 'affine'
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
|
SENTRY_RELEASE: ${{ inputs.app-version }}
|
|
- name: Upload android artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: android
|
|
path: packages/frontend/apps/android/dist
|
|
|
|
ios:
|
|
runs-on: 'macos-15'
|
|
needs:
|
|
- build-ios-web
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Setup Version
|
|
uses: ./.github/actions/setup-version
|
|
with:
|
|
app-version: ${{ inputs.app-version }}
|
|
ios-app-version: ${{ inputs.ios-app-version }}
|
|
- name: 'Update Code Sign Identity'
|
|
shell: bash
|
|
run: ./packages/frontend/apps/ios/update_code_sign_identity.sh
|
|
- name: Download mobile artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
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/ios
|
|
playwright-install: false
|
|
electron-install: false
|
|
hard-link-nm: false
|
|
enableScripts: false
|
|
- uses: maxim-lobanov/setup-xcode@v1
|
|
with:
|
|
xcode-version: 26.2
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.3'
|
|
- name: Install Swiftformat
|
|
run: brew install swiftformat
|
|
- name: Cap sync
|
|
run: yarn workspace @affine/ios sync
|
|
- name: Signing By Apple Developer ID
|
|
uses: apple-actions/import-codesign-certs@v7
|
|
id: import-codesign-certs
|
|
with:
|
|
p12-file-base64: ${{ secrets.CERTIFICATES_P12_MOBILE }}
|
|
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD_MOBILE }}
|
|
- name: Setup Rust
|
|
uses: ./.github/actions/build-rust
|
|
with:
|
|
target: 'aarch64-apple-ios'
|
|
package: 'affine_mobile_native'
|
|
no-build: 'true'
|
|
- name: Testflight
|
|
working-directory: packages/frontend/apps/ios/App
|
|
run: |
|
|
printf '%s' "$BUILD_PROVISION_PROFILE" | base64 --decode -o "$PP_PATH"
|
|
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
|
|
cp "$PP_PATH" "$HOME/Library/MobileDevice/Provisioning Profiles"
|
|
bundle install
|
|
bundle exec fastlane beta
|
|
env:
|
|
BUNDLE_PATH: vendor/bundle
|
|
BUILD_TARGET: distribution
|
|
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 }}
|
|
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@v7
|
|
- name: Setup Version
|
|
uses: ./.github/actions/setup-version
|
|
with:
|
|
app-version: ${{ inputs.app-version }}
|
|
- name: Download mobile artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: android
|
|
path: packages/frontend/apps/android/dist
|
|
- name: Load Google Service file
|
|
env:
|
|
DATA: ${{ secrets.FIREBASE_ANDROID_GOOGLE_SERVICE_JSON }}
|
|
run: |
|
|
set -euo pipefail
|
|
printf '%s' "$DATA" | base64 -di > packages/frontend/apps/android/App/app/google-services.json
|
|
- name: Setup Node.js
|
|
uses: ./.github/actions/setup-node
|
|
timeout-minutes: 10
|
|
with:
|
|
extra-flags: workspaces focus @affine/monorepo @affine-tools/cli @affine/android @affine/playstore-auto-bump
|
|
playwright-install: false
|
|
electron-install: false
|
|
hard-link-nm: false
|
|
enableScripts: false
|
|
- name: Setup Rust
|
|
uses: ./.github/actions/build-rust
|
|
with:
|
|
target: 'aarch64-linux-android'
|
|
package: 'affine_mobile_native'
|
|
no-build: 'true'
|
|
- name: Cap sync
|
|
run: yarn workspace @affine/android cap sync
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Auth gcloud
|
|
id: auth
|
|
uses: google-github-actions/auth@v2
|
|
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 }}'
|
|
access_token_scopes: 'https://www.googleapis.com/auth/androidpublisher'
|
|
- uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '21'
|
|
cache: 'gradle'
|
|
- name: Auto increment version code
|
|
id: bump
|
|
run: yarn affine @affine/playstore-auto-bump bump
|
|
env:
|
|
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }}
|
|
- 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 --flavor ${{ env.BUILD_TYPE }} --androidreleasetype AAB
|
|
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 }}
|
|
VERSION_NAME: ${{ inputs.app-version }}
|
|
- name: Upload to Google Play
|
|
uses: r0adkll/upload-google-play@v1
|
|
with:
|
|
serviceAccountJson: ${{ steps.auth.outputs.credentials_file_path }}
|
|
packageName: app.affine.pro
|
|
releaseName: ${{ inputs.app-version }}
|
|
releaseFiles: packages/frontend/apps/android/App/app/build/outputs/bundle/${{ env.BUILD_TYPE }}Release/app-${{ env.BUILD_TYPE }}-release-signed.aab
|
|
track: internal
|
|
status: draft
|
|
existingEditId: ${{ steps.bump.outputs.EDIT_ID }}
|