跳转到内容

Firebase

The firebase target publishes your package artifacts to the firebase.

必要条件

  • Firebase CLI

运行以下命令

npm install -g firebase-tools

设置环境变量

需要设置一些环境变量才能正确运行。

# 获取 token https://firebase.google.com/docs/cli?authuser=0#cli-ci-systems
firebase login:ci

export FIREBASE_TOKEN="your firebase login:ci Token"

用法

运行:

fastforge publish \
  --path dist/1.0.0+1/hello_world-1.0.0+1-android.apk \
  --targets firebase \
  --firebase-app '<app ID>' \
  --firebase-testers testers@gmail.com \
  --firebase-groups fastforge \
  --firebase-release-notes 'release v1.0.0' /

配置 distribute_options.yaml

yaml
variables:
  FIREBASE_TOKEN: your token, See[https://firebase.google.com/docs/cli?authuser=0#cli-ci-systems]
output: dist/
releases:
  - name: dev
    jobs:
      - name: release-dev-android
        package:
          platform: android
          target: apk
          build_args:
            target-platform: android-arm
        # Publish to firebase
        publish:
          target: firebase
          args:
            app: your app ID
            testers: testers@gmail.com
            groups: fastforge
            release-notes: release v1.0.0

运行:

fastforge release --name dev

相关链接

基于 MIT 许可发布