Skip to content

Commit

Permalink
chore: Add Play store publisher doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lijy91 committed May 18, 2024
1 parent ab3aad9 commit b95d269
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
*.iml
.idea/

pubspec_overrides.yaml
pubspec_overrides.yaml
pubspec.lock
1 change: 1 addition & 0 deletions website/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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/" },
],
Expand Down
55 changes: 55 additions & 0 deletions website/src/content/docs/publishers/playstore.md
Original file line number Diff line number Diff line change
@@ -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)
55 changes: 55 additions & 0 deletions website/src/content/docs/zh-hans/publishers/playstore.md
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit b95d269

Please sign in to comment.