chore: release beta package

This commit is contained in:
appflowy 2022-04-08 20:08:01 +08:00
parent 6de7933a2f
commit a035228798
3 changed files with 25 additions and 13 deletions

View File

@ -66,7 +66,7 @@ jobs:
working-directory: frontend
run: |
flutter config --enable-linux-desktop
cargo make --profile production-linux-x86 appflowy
cargo make --env APP_VERSION=${{ github.ref_name }} --profile production-linux-x86 appflowy
- name: Upload Release Asset
id: upload-release-asset
@ -111,7 +111,7 @@ jobs:
working-directory: frontend
run: |
flutter config --enable-macos-desktop
cargo make --profile production-mac-x86 appflowy
cargo make --env APP_VERSION=${{ github.ref_name }} --profile production-mac-x86 appflowy
- name: Archive macOS app
working-directory: ${{ env.MACOS_APP_RELEASE_PATH }}

View File

@ -21,7 +21,7 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
CARGO_MAKE_CRATE_NAME = "dart-ffi"
LIB_NAME = "dart_ffi"
VERSION = "0.0.3"
CURRENT_APP_VERSION = "0.0.4"
FEATURES = "flutter"
PRODUCT_NAME = "AppFlowy"
#CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html

View File

@ -5,16 +5,16 @@ linux_alias = "appflowy-linux"
[tasks.appflowy-macos]
dependencies = ["flowy-sdk-release"]
run_task = { name = ["code_generation", "flutter-build", "copy-to-product"] }
run_task = { name = ["code_generation", "set-app-version", "flutter-build", "copy-to-product"] }
script_runner = "@shell"
[tasks.appflowy-windows]
dependencies = ["flowy-sdk-release"]
run_task = { name = ["code_generation", "flutter-build", "copy-to-product"] }
run_task = { name = ["code_generation", "set-app-version", "flutter-build", "copy-to-product"] }
[tasks.appflowy-linux]
dependencies = ["flowy-sdk-release"]
run_task = { name = ["code_generation", "flutter-build", "copy-to-product", "create-release-archive"] }
run_task = { name = ["code_generation", "set-app-version", "flutter-build", "copy-to-product", "create-release-archive"] }
script_runner = "@shell"
[tasks.appflowy-dev]
@ -24,16 +24,16 @@ linux_alias = "appflowy-linux-dev"
[tasks.appflowy-macos-dev]
dependencies = ["flowy-sdk-dev"]
run_task = { name = ["code_generation", "flutter-build", "copy-to-product"] }
run_task = { name = ["code_generation", "set-app-version", "flutter-build", "copy-to-product"] }
script_runner = "@shell"
[tasks.appflowy-windows-dev]
dependencies = ["flowy-sdk-dev"]
run_task = { name = ["code_generation", "flutter-build", "copy-to-product"] }
run_task = { name = ["code_generation", "set-app-version", "flutter-build", "copy-to-product"] }
[tasks.appflowy-linux-dev]
dependencies = ["flowy-sdk-dev"]
run_task = { name = ["code_generation", "flutter-build", "copy-to-product"] }
run_task = { name = ["code_generation", "set-app-version", "flutter-build", "copy-to-product"] }
script_runner = "@shell"
[tasks.copy-to-product]
@ -44,7 +44,7 @@ linux_alias = "copy-to-product-linux"
[tasks.copy-to-product-macos]
script = [
"""
product_path=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}
product_path=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${APP_VERSION}
output_path=${product_path}/${TARGET_OS}/${FLUTTER_OUTPUT_DIR}
if [ -d "${output_path}" ]; then
rm -rf ${output_path}/
@ -61,7 +61,7 @@ script_runner = "@shell"
[tasks.copy-to-product-linux]
script = [
"""
product_path=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}
product_path=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${APP_VERSION}
output_path=${product_path}/${TARGET_OS}/${FLUTTER_OUTPUT_DIR}
if [ -d "${output_path}" ]; then
rm -rf ${output_path}/
@ -81,7 +81,7 @@ script_runner = "@shell"
[tasks.copy-to-product-windows]
script = [
"""
product_path= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${VERSION}
product_path= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/product/${APP_VERSION}
output_path= set ${product_path}/${TARGET_OS}
if is_path_exists ${output_path}
rm -r ${output_path}/
@ -95,6 +95,18 @@ script = [
]
script_runner = "@duckscript"
[tasks.set-app-version]
script = [
"""
if is_empty ${APP_VERSION}
APP_VERSION = set ${CURRENT_APP_VERSION}
set_env APP_VERSION ${CURRENT_APP_VERSION}
end
echo APP_VERSION: ${APP_VERSION}
""",
]
script_runner = "@duckscript"
# The following tasks will create an archive that will be used on the GitHub Releases section
# The archives are created using different compression programs depending on the target OS
# The archive will be composed of all files that are located in the /Release/AppFlowy directory
@ -129,7 +141,7 @@ script = [
cd app_flowy/
flutter clean
flutter pub get
flutter build ${TARGET_OS} --${BUILD_FLAG} --build-name=${VERSION}
flutter build ${TARGET_OS} --${BUILD_FLAG} --build-name=${APP_VERSION}
""",
]
script_runner = "@shell"