Skip to content

Commit

Permalink
chore: add SENTRY_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Aug 14, 2024
1 parent 70292b2 commit cf2aa59
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 86 deletions.
91 changes: 46 additions & 45 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@ name: Build AppFlowy Android
on:
workflow_dispatch:
inputs:
repo:
description: "Repo"
required: true
default: "AppFlowy-IO/AppFlowy"
branch:
description: "Branch"
required: true
default: "main"
build_name:
description: "Build Version (it should match the version in pubspec.yaml)"
required: true
default: "0.6.4"
build_number:
description: 'Build Number (it should be unique)'
required: true
default: "2904300"
build_type:
type: choice
description: 'Build Type'
required: true
options:
- 'apk'
- 'appbundle'
internal_build:
type: choice
description: 'Internal Build Type (1 for internal, 0 for external)'
required: true
default: '1'
options:
- 0
- 1
repo:
description: "Repo"
required: true
default: "AppFlowy-IO/AppFlowy"
branch:
description: "Branch"
required: true
default: "main"
build_name:
description: "Build Version (it should match the version in pubspec.yaml)"
required: true
default: "0.6.4"
build_number:
description: "Build Number (it should be unique)"
required: true
default: "2904300"
build_type:
type: choice
description: "Build Type"
required: true
options:
- "apk"
- "appbundle"
internal_build:
type: choice
description: "Internal Build Type (1 for internal, 0 for external)"
required: true
default: "1"
options:
- 0
- 1

env:
FLUTTER_VERSION: "3.22.0"
Expand Down Expand Up @@ -68,8 +68,8 @@ jobs:

- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
distribution: "temurin" # See 'Supported distributions' for available options
java-version: "17"

- name: Install Rust toolchain
id: rust_toolchain
Expand All @@ -91,8 +91,8 @@ jobs:
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: "r26d"
add-to-path: true
ndk-version: "r26d"
add-to-path: true

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -102,7 +102,7 @@ jobs:
- uses: davidB/rust-cargo-make@v1
with:
version: '0.37.5'
version: "0.37.5"

- name: Install prerequisites
working-directory: frontend
Expand Down Expand Up @@ -131,6 +131,7 @@ jobs:
working-directory: frontend/appflowy_flutter
run: |
echo "INTERNAL_BUILD=${{ github.env.inputs.internal_build }}" >> .env
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env
shell: bash

- name: Configure release sign
Expand All @@ -151,14 +152,14 @@ jobs:
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
cargo make --profile production-android appflowy-core-dev-android
cargo make --profile production-android code_generation
cd appflowy_flutter
if [ ${{github.event.inputs.build_type}} = "apk" ]; then
flutter build apk --build-name ${{ github.event.inputs.build_name }} --build-number ${{ github.event.inputs.build_number }} --split-per-abi --split-debug-info=./ --obfuscate
elif [ ${{github.event.inputs.build_type}} = "appbundle" ]; then
flutter build appbundle --build-name ${{ github.event.inputs.build_name }} --build-number ${{ github.event.inputs.build_number }} --split-debug-info=./ --obfuscate
fi
cargo make --profile production-android appflowy-core-dev-android
cargo make --profile production-android code_generation
cd appflowy_flutter
if [ ${{github.event.inputs.build_type}} = "apk" ]; then
flutter build apk --build-name ${{ github.event.inputs.build_name }} --build-number ${{ github.event.inputs.build_number }} --split-per-abi --split-debug-info=./ --obfuscate
elif [ ${{github.event.inputs.build_type}} = "appbundle" ]; then
flutter build appbundle --build-name ${{ github.event.inputs.build_name }} --build-number ${{ github.event.inputs.build_number }} --split-debug-info=./ --obfuscate
fi
- name: Upload APK
if: github.event.inputs.build_type == 'apk'
Expand All @@ -185,4 +186,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: AppFlowy-${{ github.event.inputs.build_name }}.aab
path: frontend/appflowy_flutter/build/app/outputs/bundle/release/AppFlowy.aab
path: frontend/appflowy_flutter/build/app/outputs/bundle/release/AppFlowy.aab
13 changes: 7 additions & 6 deletions .github/workflows/ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ on:
default: "1"
internal_build:
type: choice
description: 'Internal Build Type (1 for internal, 0 for external)'
description: "Internal Build Type (1 for internal, 0 for external)"
required: true
default: '1'
default: "1"
options:
- 0
- 1
- 2
- 0
- 1
- 2

env:
FLUTTER_VERSION: "3.22.0"
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- uses: davidB/rust-cargo-make@v1
with:
version: '0.37.5'
version: "0.37.5"

- name: Install prerequisites
working-directory: frontend
Expand All @@ -123,6 +123,7 @@ jobs:
working-directory: frontend/appflowy_flutter
run: |
echo "INTERNAL_BUILD=${{ github.env.inputs.internal_build }}" >> .env
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env
shell: bash

- name: Build AppFlowy
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ on:
default: "0.6.4"
internal_build:
type: choice
description: 'Internal Build Type (1 for internal, 0 for external)'
description: "Internal Build Type (1 for internal, 0 for external)"
required: true
default: '1'
default: "1"
options:
- 0
- 1
- 0
- 1

env:
FLUTTER_VERSION: "3.22.0"
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
- uses: davidB/rust-cargo-make@v1
with:
version: '0.37.5'
version: "0.37.5"

- name: Install prerequisites
working-directory: frontend
Expand Down Expand Up @@ -150,8 +150,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: ${{ env.LINUX_PACKAGE_APPIMAGE_NAME}}
path:
frontend/AppFlowy-${{ github.event.inputs.build_name }}-x86_64.AppImage
path: frontend/AppFlowy-${{ github.event.inputs.build_name }}-x86_64.AppImage

- name: Upload RPM
uses: actions/upload-artifact@v2
Expand All @@ -178,4 +177,4 @@ jobs:
fields: repo,message,author,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
if: always()
27 changes: 13 additions & 14 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ on:
default: "0.6.4"
arch:
type: choice
description: 'Build Architecture'
description: "Build Architecture"
required: true
options:
- All
- x86_64
- aarch64
- universal
- All
- x86_64
- aarch64
- universal
internal_build:
type: choice
description: 'Internal Build Type (1 for internal, 0 for external)'
description: "Internal Build Type (1 for internal, 0 for external)"
required: true
default: '1'
default: "1"
options:
- 0
- 1
- 0
- 1

env:
FLUTTER_VERSION: "3.22.0"
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:

- uses: davidB/rust-cargo-make@v1
with:
version: '0.37.5'
version: "0.37.5"

- name: Install prerequisites
working-directory: frontend
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:

- uses: davidB/rust-cargo-make@v1
with:
version: '0.37.5'
version: "0.37.5"

- name: Install prerequisites
working-directory: frontend
Expand Down Expand Up @@ -237,7 +237,6 @@ jobs:
name: ${{ env.MACOS_DMG_NAME }}.dmg
path: ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg


universal:
runs-on: macos-latest

Expand Down Expand Up @@ -271,7 +270,7 @@ jobs:

- uses: davidB/rust-cargo-make@v1
with:
version: '0.37.5'
version: "0.37.5"

- name: Install prerequisites
working-directory: frontend
Expand Down Expand Up @@ -362,4 +361,4 @@ jobs:
fields: repo,message,author,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
if: always()
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build AppFlowy Application
name: Build AppFlowy Application

on:
push:
Expand Down Expand Up @@ -176,7 +176,6 @@ jobs:
flutter config --enable-macos-desktop
sh scripts/flutter_release_build/build_universal_package_for_macos.sh ${{ needs.prepare.outputs.version }}
- name: Check for Code signing ID
run: |
if [ -z "${{ env.MACOS_CODESIGN_ID }}" ]; then
Expand Down Expand Up @@ -232,11 +231,11 @@ jobs:
matrix:
job:
- {
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
flutter_profile: production-linux-x86_64,
}
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
flutter_profile: production-linux-x86_64,
}
env:
LINUX_APP_RELEASE_PATH: frontend/appflowy_flutter/product/${{ needs.prepare.outputs.version }}/linux/Release
LINUX_PACKAGE_DEB_NAME: AppFlowy-${{ needs.prepare.outputs.version }}-linux-x86_64.deb
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ on:
default: "0.6.4"
internal_build:
type: choice
description: 'Internal Build Type (1 for internal, 0 for external)'
description: "Internal Build Type (1 for internal, 0 for external)"
required: true
default: '1'
default: "1"
options:
- 0
- 1
- 0
- 1

env:
FLUTTER_VERSION: "3.22.0"
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:

- uses: davidB/rust-cargo-make@v1
with:
version: '0.37.5'
version: "0.37.5"

- name: Install prerequisites
working-directory: frontend
Expand Down Expand Up @@ -126,4 +126,4 @@ jobs:
fields: repo,message,author,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
if: always()

0 comments on commit cf2aa59

Please sign in to comment.