How to pass the json file in github Action?
Asked Answered
B

1

7

I am trying to create the web flow to release the app on play store.

Here is the code:

- 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

But not able to understand how to pass the JSON service account file location at the serviceAccountJson key?

Do I need to store the file in the local and pass the path or I need to add the file in the Github secret?

Bronk answered 9/10, 2020 at 15:33 Comment(0)
T
2

If you want to pass an actual JSON rather than the reference to the file you should use:

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

If you want to point to a file you can:

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

the file path is relative to the root of the repo.

Tungstate answered 9/11, 2020 at 15:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.