【问题标题】:How to pass the json file in github Action?如何在 github Action 中传递 json 文件?
【发布时间】:2021-01-24 17:04:31
【问题描述】:

我正在尝试创建网络流以在 Play 商店中发布应用程序。

代码如下:

- name: Upload to Google Play
        uses: r0adkll/upload-google-play@v1
        with:
          serviceAccountJson: ${{ SERVICE_ACCOUNT_JSON }}
          packageName: packagename
          releaseFile: app/release/app.aab
          track: internal
          whatsNewDirectory: distribution/whatsnew

但无法理解如何在 serviceAccountJson 键处传递 JSON 服务帐户文件位置?

我需要将文件存储在本地并传递路径还是需要将文件添加到 Github 密码中?

【问题讨论】:

    标签: github google-play github-actions google-play-console google-play-developer-api


    【解决方案1】:

    如果你想传递一个实际的 JSON 而不是你应该使用的文件的引用:

    serviceAccountJsonPlainText: ${{ secrets.my-json-content-var}}
    

    如果你想指向一个文件,你可以:

    serviceAccountJson: /the-path-the-file-is-in/yourjsonfile.json
    

    文件路径相对于 repo 的根目录。

    【讨论】:

      猜你喜欢
      • 2022-01-03
      • 2022-12-11
      • 2011-06-25
      • 1970-01-01
      • 2021-11-05
      • 2022-12-06
      • 2020-07-30
      • 2021-11-22
      • 2022-06-17
      相关资源
      最近更新 更多