mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #1007 from LucasXu0/windows_relesae_action
feat: integrate github action for windows x86_64 release
This commit is contained in:
commit
8371efd3e6
51
.github/workflows/release.yml
vendored
51
.github/workflows/release.yml
vendored
@ -129,3 +129,54 @@ jobs:
|
|||||||
asset_path: ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_X86_ZIP_NAME }}
|
asset_path: ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_X86_ZIP_NAME }}
|
||||||
asset_name: ${{ env.MACOS_X86_ZIP_NAME }}
|
asset_name: ${{ env.MACOS_X86_ZIP_NAME }}
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
build-windows-x86_64:
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: create-release
|
||||||
|
env:
|
||||||
|
WINDOWS_APP_RELEASE_PATH: frontend\app_flowy\product\${{ github.ref_name }}\windows
|
||||||
|
WINDOWS_ZIP_NAME: AppFlowy-windows-x86_64.zip
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup environment - Rust and Cargo
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: 'stable-2022-01-20'
|
||||||
|
|
||||||
|
- name: Setup environment - Flutter
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: 'stable'
|
||||||
|
flutter-version: '3.0.5'
|
||||||
|
|
||||||
|
- name: Pre build
|
||||||
|
working-directory: frontend
|
||||||
|
run: |
|
||||||
|
vcpkg integrate install
|
||||||
|
cargo install --force cargo-make
|
||||||
|
cargo install --force duckscript_cli
|
||||||
|
cargo make flowy_dev
|
||||||
|
|
||||||
|
- name: Build Windows app
|
||||||
|
working-directory: frontend
|
||||||
|
run: |
|
||||||
|
flutter config --enable-windows-desktop
|
||||||
|
cargo make --env APP_VERSION=${{ github.ref_name }} --profile production-windows-x86 appflowy
|
||||||
|
|
||||||
|
- uses: vimtor/action-zip@v1
|
||||||
|
with:
|
||||||
|
files: ${{ env.WINDOWS_APP_RELEASE_PATH }}\
|
||||||
|
dest: ${{ env.WINDOWS_APP_RELEASE_PATH }}\${{ env.WINDOWS_ZIP_NAME }}
|
||||||
|
|
||||||
|
- name: Upload Release Asset
|
||||||
|
id: upload-release-asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
||||||
|
asset_path: ${{ env.WINDOWS_APP_RELEASE_PATH }}\${{ env.WINDOWS_ZIP_NAME }}
|
||||||
|
asset_name: ${{ env.WINDOWS_ZIP_NAME }}
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
@ -186,7 +186,7 @@ script = [
|
|||||||
"""
|
"""
|
||||||
cd ./app_flowy/
|
cd ./app_flowy/
|
||||||
exec cmd.exe /c flutter clean
|
exec cmd.exe /c flutter clean
|
||||||
exec cmd.exe /c flutter pub get
|
exec cmd.exe /c flutter packages pub get
|
||||||
exec cmd.exe /c flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
exec cmd.exe /c flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
|
||||||
exec cmd.exe /c flutter packages pub run build_runner build --delete-conflicting-outputs
|
exec cmd.exe /c flutter packages pub run build_runner build --delete-conflicting-outputs
|
||||||
"""
|
"""
|
||||||
|
@ -29,6 +29,9 @@ end
|
|||||||
ret = which protoc-gen-dart
|
ret = which protoc-gen-dart
|
||||||
if is_empty ${ret}
|
if is_empty ${ret}
|
||||||
exec cmd.exe /c dart pub global activate protoc_plugin
|
exec cmd.exe /c dart pub global activate protoc_plugin
|
||||||
|
end
|
||||||
|
ret = which protoc-gen-dart
|
||||||
|
if is_empty ${ret}
|
||||||
home_dir = get_home_dir
|
home_dir = get_home_dir
|
||||||
echo Please add '${home_dir}\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\bin' into PATH env var
|
echo Please add '${home_dir}\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\bin' into PATH env var
|
||||||
exit -1
|
exit -1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user