From b95d269ff92637ad47092291a18457ea74447c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=81=A5=E8=8E=B9?= Date: Sat, 18 May 2024 22:19:39 +0800 Subject: [PATCH] chore: Add Play store publisher doc --- .gitignore | 3 +- website/astro.config.mjs | 1 + .../src/content/docs/publishers/playstore.md | 55 +++++++++++++++++++ .../docs/zh-hans/publishers/playstore.md | 55 +++++++++++++++++++ 4 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 website/src/content/docs/publishers/playstore.md create mode 100644 website/src/content/docs/zh-hans/publishers/playstore.md diff --git a/.gitignore b/.gitignore index b03b5a7c..1fcef0ef 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ *.iml .idea/ -pubspec_overrides.yaml \ No newline at end of file +pubspec_overrides.yaml +pubspec.lock diff --git a/website/astro.config.mjs b/website/astro.config.mjs index a6bce1a3..625df952 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -81,6 +81,7 @@ export default defineConfig({ { label: "firebase", link: "/publishers/firebase/" }, { label: "github", link: "/publishers/github/" }, { label: "pgyer", link: "/publishers/pgyer/" }, + { label: "playstore", link: "/publishers/playstore/" }, { label: "qiniu", link: "/publishers/qiniu/" }, { label: "vercel", link: "/publishers/vercel/" }, ], diff --git a/website/src/content/docs/publishers/playstore.md b/website/src/content/docs/publishers/playstore.md new file mode 100644 index 00000000..ea10a9f0 --- /dev/null +++ b/website/src/content/docs/publishers/playstore.md @@ -0,0 +1,55 @@ +--- +title: Google Play +--- + +The playstore target publishes your package artifacts to the [Google Play](https://play.google.com/store/apps). + +## Set up environment variables + +requires some environment variables set up to run correctly. + +``` +# Get your service account credentials https://cloud.google.com/iam/docs/keys-create-delete +export PLAYSTORE_CREDENTIALS="your service account credentials file path" +``` + +## Usage + +Run: + +``` +flutter_distributor publish \ + --path dist/1.0.0+1/hello_world-1.0.0+1-android.aab \ + --targets playstore \ + --playstore-package-name 'org.leanflutter.examples.hello_world' / +``` + +### Configure `distribute_options.yaml` + +```yaml +output: dist/ +releases: + - name: dev + jobs: + - name: build-aab + package: + platform: android + target: aab + build_args: + target-platform: android-arm + # Publish to playstore + publish: + target: playstore + args: + package-name: org.leanflutter.examples.hello_world +``` + +Run: + +``` +flutter_distributor release --name dev +``` + +## Related Links + +- [Create and delete service account keys](https://cloud.google.com/iam/docs/keys-create-delete) diff --git a/website/src/content/docs/zh-hans/publishers/playstore.md b/website/src/content/docs/zh-hans/publishers/playstore.md new file mode 100644 index 00000000..02bc89e5 --- /dev/null +++ b/website/src/content/docs/zh-hans/publishers/playstore.md @@ -0,0 +1,55 @@ +--- +title: Google Play +--- + +The playstore target publishes your package artifacts to the [Google Play](https://play.google.com/store/apps). + +## 设置环境变量 + +需要设置一些环境变量才能正确运行。 + +``` +# 获取你的服务账号密钥 https://cloud.google.com/iam/docs/keys-create-delete?hl=zh-cn +export PLAYSTORE_CREDENTIALS="your service account credentials file path" +``` + +## Usage + +Run: + +``` +flutter_distributor publish \ + --path dist/1.0.0+1/hello_world-1.0.0+1-android.aab \ + --targets playstore \ + --playstore-package-name 'org.leanflutter.examples.hello_world' / +``` + +### 配置 `distribute_options.yaml` + +```yaml +output: dist/ +releases: + - name: dev + jobs: + - name: build-aab + package: + platform: android + target: aab + build_args: + target-platform: android-arm + # Publish to playstore + publish: + target: playstore + args: + package-name: org.leanflutter.examples.hello_world +``` + +运行: + +``` +flutter_distributor release --name dev +``` + +## 相关链接 + +- [创建和删除服务账号密钥](https://cloud.google.com/iam/docs/keys-create-delete?hl=zh-cn)