Files
pezkuwi-wallet-android/.github/workflows/distribute_app_to_play_store.yml
T
SatoshiQaziMuhammed 46d7e66f99 Fix open Dependabot and code scanning alerts (#21)
* build(rust): bump vulnerable crates in native binding lockfiles

- rand 0.8.5 -> 0.8.6 (GHSA-cq8v-f236-94qc) in hydra-dx-math and sr25519-bizinikiwi
- keccak 0.1.5 -> 0.1.6 (GHSA-3288-p39f-rqpv) in hydra-dx-math and sr25519-bizinikiwi
- bytes -> 1.11.1 (GHSA-434x-w66g-qw3r) in hydra-dx-math and metadata_shortener
- time 0.3.41 -> 0.3.47 (GHSA-r6v5-fh4h-64xc) in hydra-dx-math
- tracing-subscriber 0.3.19 -> 0.3.20 (GHSA-xwfj-jgwm-7wp5) in hydra-dx-math

Lockfile-only updates via cargo update --precise; Cargo.toml requirements
are unchanged. time 0.3.47 pulls serde 1.0.229/serde_core and requires
rustc 1.88, which the stable toolchain used by CI satisfies.

* ci: restrict default GITHUB_TOKEN permissions to contents: read

None of these workflows write through GITHUB_TOKEN: artifact upload,
Firebase, S3, Play Store, gh-pages and the Appium dispatch all use their
own credentials. Reusable workflows they call inherit the same cap.

* fix(dapp): send only fixed, JSON-quoted error messages to dApp pages

The polkadot.js responder forwarded Throwable.message of any rejection
error to the page and both responders interpolated the message into
JavaScript without escaping. Map polkadot.js rejections to a fixed public
message (unknown errors become "Request failed"), give MetamaskError an
explicit publicMessage, and quote both with JSONObject.quote so a message
can no longer break out of the string literal.

* ci: stop installing the removed legacy SDK 'tools' package

android-actions/setup-android installs 'tools platform-tools' by default.
sdkmanager now fails with "Failed to find package 'tools'", which aborts
dependency installation for every build and lint job. Only platform-tools
is needed; nothing in the workflows uses the legacy tools directory.
2026-10-03 00:39:49 +04:00

101 lines
3.2 KiB
YAML

name: Distribute app to Play Store
on:
workflow_dispatch:
inputs:
app_version:
description: 'Version of application (e.g. v1.0.0)'
required: true
default: v1.0.0
branch:
description: 'From which branch the application will be built'
required: true
default: main
track:
description: 'Play Store track (alpha, beta, production)'
required: true
default: alpha
type: choice
options:
- alpha
- beta
- production
status:
description: 'Release status (draft, completed, inProgress=staged)'
required: true
default: draft
type: choice
options:
- draft
- completed
- inProgress
user_fraction:
description: 'Staged rollout fraction for inProgress (e.g. 0.2 = 20%). Ignored unless status=inProgress.'
required: false
default: '0.2'
type: string
permissions:
contents: read
jobs:
build:
uses: pezkuwichain/pezkuwi-wallet-android/.github/workflows/android_build.yml@main
with:
branch: ${{ github.event.inputs.branch }}
gradlew-command: bundleReleaseMarket
keystore-file-name: market_key.jks
secrets: inherit
upload:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download bundle artifact
uses: actions/download-artifact@v4
with:
name: apk-bundle
path: app/bundle
- name: Download mapping artifact
uses: actions/download-artifact@v4
with:
name: apk-mapping
path: app/mapping
continue-on-error: true
- name: Download native debug symbols
uses: actions/download-artifact@v4
with:
name: apk-native-debug-symbols
path: app/native-debug-symbols
continue-on-error: true
- name: Rename artifacts
run: mv app/bundle/releaseMarket/app-releaseMarket.aab app/bundle/releaseMarket/pezkuwi-wallet-android-${{ github.event.inputs.app_version }}.aab
- name: Check for native debug symbols
id: check-symbols
run: |
if [ -f "app/native-debug-symbols/releaseMarket/native-debug-symbols.zip" ]; then
echo "path=app/native-debug-symbols/releaseMarket/native-debug-symbols.zip" >> $GITHUB_OUTPUT
fi
- name: Market publication
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
packageName: io.pezkuwichain.wallet
releaseFiles: app/bundle/releaseMarket/pezkuwi-wallet-android-${{ github.event.inputs.app_version }}.aab
track: ${{ github.event.inputs.track }}
status: ${{ github.event.inputs.status }}
# userFraction only applies to staged rollout (status=inProgress); empty otherwise
userFraction: ${{ github.event.inputs.status == 'inProgress' && github.event.inputs.user_fraction || '' }}
inAppUpdatePriority: 2
whatsNewDirectory: distribution/whatsnew
mappingFile: app/mapping/releaseMarket/mapping.txt
debugSymbols: ${{ steps.check-symbols.outputs.path }}