flutter_distributor icon indicating copy to clipboard operation
flutter_distributor copied to clipboard

Environment Variables not work

Open lockingroad opened this issue 6 months ago • 1 comments

run.sh

export TUAI_API_KEY="xxxxxxxxx"
fastforge release --name android

distribute_options.yaml

variables:
  PGYER_API_KEY: ${TUAI_API_KEY}
output: dist/
releases:
  - name: android
    jobs:
      - name: release-market-android
        package:
          platform: android
          target: apk
          build_args:
            target-platform: android-arm64
            flavor: market
        publish_to: pgyer

output: PublishError: PublishError: getCOSToken error: {code: 1002, message: _api_key not found}

The build package was successfully generated, but the environment variable for the key did not take effect, causing the upload to fail. How should I properly set the environment variable?

lockingroad avatar Jul 03 '25 04:07 lockingroad

I am using "fastforge package" instead of "fastforge release"

You can see other commands with "fastforge -h". I recommend using the -h (fastforge pacakge -h) flag to view the command details, supplementary to the official website documentation.

veto9292 avatar Oct 16 '25 07:10 veto9292