cd: add playstore publish support

This commit is contained in:
Kingkor Roy Tirtho 2024-08-11 13:45:03 +06:00
parent b32ec9ccf9
commit b0a07b58d5

View File

@ -12,10 +12,10 @@ on:
type: boolean
default: true
jobs:
description: Jobs to run (flathub,aur,winget,chocolatey)
description: Jobs to run (flathub,aur,winget,chocolatey,playstore)
required: true
type: string
default: "flathub,aur,winget,chocolatey"
default: "flathub,aur,winget,chocolatey,playstore"
jobs:
flathub:
@ -104,3 +104,33 @@ jobs:
- name: Publish to Chocolatey Repository
if: ${{ !inputs.dry_run }}
run: choco push Spotube-windows-x86_64.nupkg --source https://push.chocolatey.org/
playstore:
runs-on: ubuntu-latest
if: contains(inputs.jobs, 'playstore')
steps:
- name: Tagname (workflow dispatch)
run: echo 'TAG_NAME=${{inputs.version}}' >> $GITHUB_ENV
- uses: robinraju/release-downloader@main
with:
tag: ${{ env.TAG_NAME }}
tarBall: false
zipBall: false
out-file-path: dist
fileName: "Spotube-playstore-all-arch.aab"
- name: Create service-account.json
run: |
echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > service-account.json
- name: Upload Android Release to Play Store
if: ${{!inputs.dry_run}}
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: ./service-account.json
releaseFiles: ./dist/Spotube-playstore-all-arch.aab
packageName: oss.krtirtho.spotube
track: production
status: draft
releaseName: ${{ env.TAG_NAME }}