Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass the json file in github Action?

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?

like image 398
Ankur_009 Avatar asked Oct 26 '22 17:10

Ankur_009


1 Answers

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.

like image 169
Gabriel Kohen Avatar answered Nov 17 '22 02:11

Gabriel Kohen