Skip to content

GitHub Action ​

The action runs the StorePilot command-line tool in a workflow. It downloads the release that matches the action version, checks its SHA-256, caches it, and writes the result to the job summary. It is a composite action, so it runs on Linux, macOS, and Windows runners without Docker.

It needs Java 17 or later on the runner, which actions/setup-java provides.

yaml
- uses: muhammedelsami/storepilot@v0

@v0 follows the newest 0.x release. Pin @v0.1.1 for an exact version.

Publish when a version tag is pushed ​

yaml
name: Publish

on:
  push:
    tags: ["v*"]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - uses: actions/setup-java@v6
        with:
          distribution: temurin
          java-version: 17

      - uses: gradle/actions/setup-gradle@v6

      - name: Build the release bundle
        run: ./gradlew :app:bundleRelease

      - name: Publish to Google Play
        uses: muhammedelsami/storepilot@v0
        with:
          artifact: app/build/outputs/bundle/release/*.aab
          metadata-dir: app/store
          track: production
          rollout: "0.1"
          with-listing: true
          google-play-service-account-json: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}

The package name comes from the bundle, so the workflow does not repeat it. artifact may be a glob, but it must match exactly one file.

Check the listing in pull requests ​

yaml
name: Store listing

on:
  pull_request:
    paths: ["app/store/**"]
  push:
    branches: [main]
    paths: ["app/store/**"]

jobs:
  listing:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - uses: actions/setup-java@v6
        with:
          distribution: temurin
          java-version: 17

      # No network and no key: fails the pull request when the listing breaks a rule.
      - name: Validate the listing
        uses: muhammedelsami/storepilot@v0
        with:
          command: listing-validate
          metadata-dir: app/store

      # Pull requests from forks get no secrets, so the diff only runs for branches of this repository.
      - name: Show what would change
        if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
        uses: muhammedelsami/storepilot@v0
        with:
          command: listing-diff
          metadata-dir: app/store
          package-name: com.example.notes
          google-play-service-account-json: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}

      - name: Push the listing
        if: github.event_name == 'push'
        uses: muhammedelsami/storepilot@v0
        with:
          command: listing-push
          metadata-dir: app/store
          package-name: com.example.notes
          google-play-service-account-json: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}

Job summary ​

Every command adds a Markdown report to the job summary. For a publish dry run it looks like this:

StorePilot (dry run, nothing committed) ​

google-play · com.example.notes · not committed

  • upload app-release.aab
  • track production: new release, inProgress 10%, release notes: en-US, tr-TR; before: version code 41, completed
  • listing en-US short-description: "Shows how StorePilot publishes an app from files." (was "An app that shows StorePilot.")
  • listing tr-TR title: "StorePilot Örnek" (new)
  • graphics en-US phone-screenshots: replace 2 images with 2 images

listing-validate adds the problems and the locale coverage table; listing-diff adds a table of every compared item.

Inputs ​

InputDefaultUsed by
commandpublishpublish, promote, halt, resume, listing-push, listing-diff, listing-validate
artifactpublish (required). Path or glob of the .aab or .apk.
package-namefrom storepilot.yml, then from the artifactevery command that talks to the store
storegoogle-playall
configstorepilot.yml if presentall
metadata-dirstore next to the config fileall
trackfrom the config, else internalpublish: release track. promote: target track. halt, resume: required.
from-trackpromote (required)
rolloutfrom the config, else 1.0publish, promote
with-listingfalsepublish: push the listing in the same edit
text-onlyfalselisting-push: no graphics
dry-runfalsepublish, promote, halt, resume, listing-push
versionthe action's releasethe CLI version to download
google-play-service-account-jsonevery command that talks to the store, unless keyless

Outputs ​

OutputContains
resultThe command's JSON result, the same as storepilot ... --output json.
listing-changedtrue or false, set by listing-diff.
yaml
- id: diff
  uses: muhammedelsami/storepilot@v0
  with:
    command: listing-diff
    metadata-dir: app/store
    package-name: com.example.notes
    google-play-service-account-json: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}

- if: steps.diff.outputs.listing-changed == 'true'
  run: echo "The Play listing differs from app/store."

Security ​

The key reaches the CLI only through an environment variable, never as a command-line argument. Lines of the key are masked in the log in addition to GitHub's own masking of secrets. See Credentials and security for keyless authentication with Workload Identity Federation.

More complete workflows are in samples/github-workflow.

Released under the Apache License 2.0.