Use sequential Play version codes for 0.6.9.1

This commit is contained in:
maxjivi05 committed 2026-11-03 07:43:48 -05:00
1 parent d2298f4109
commit c59884b42e
4 files changed
+39 -21

No files matched your search

+2
View File
@@ -4,6 +4,8 @@
For a versioned GitHub release, run the existing `Release APKs` workflow with branch `playstore` and a Version matching `versionName` in `app/build.gradle`. That entry calls `Build PlayStore Bundle`. The Play release uses a separate tag and explicitly leaves Latest unchanged. The manual entry works without adding the branch-only workflow to `main`.
Both `versionName` and the integer `versionCode` come directly from `app/build.gradle`. Increment the repository's version code for each new Play release. Build counters, timestamps, and repository variables never add offsets to it. Push artifact filenames also use the repository's version name.
The signing environment supplies `RELEASE_KEYSTORE_B64`, `RELEASE_STORE_PASSWORD`, and `RELEASE_KEY_ALIAS`. Compilation never receives the release key. Signing checks the certificate against `keystore/release-signer.sha256`, keeps the alias out of signature filenames, and verifies every signed payload entry.
`components.lock.json` pins the native runtime, desktop packages, DroidDeck Proton, driver variants, native component variants, Decky channels, and synchronization packs. Native components have no external download fallback in the app. The bundled catalog pins current native variants rather than their complete release histories. Existing installed versions remain available.
+27 -3
View File
@@ -1,5 +1,8 @@
from pathlib import Path
import re
import os
import subprocess
import tempfile
import unittest
import yaml
@@ -81,13 +84,18 @@ class PlaystoreWorkflowTest(unittest.TestCase):
self.assertEqual("github.ref == 'refs/heads/main'", self.release['jobs'][name]['if'])
self.assertIn("'release-playstore' || 'release'", self.release['concurrency']['group'])
def test_play_version_codes_are_independent_of_the_entry_workflow_counter(self):
def test_play_version_metadata_comes_from_the_repository_without_generated_offsets(self):
self.assertEqual('playstore-bundle', self.play['concurrency']['group'])
self.assertEqual('false', self.play['concurrency']['cancel-in-progress'])
source = self.play['jobs']['source']['steps'][-1]['run']
self.assertIn('date -u +%s', source)
self.assertNotIn('date -u +%s', source)
self.assertNotIn('GITHUB_RUN_NUMBER', source)
self.assertIn('version_code=$((base + elapsed))', source)
self.assertNotIn('PLAY_VERSION_CODE_BASE', source)
self.assertIn('echo "version_code=$source_code"', source)
self.assertIn('VERSION="$name"', source)
gradle = (ROOT / 'app/build.gradle').read_text()
self.assertIn('requestedCode != android.defaultConfig.versionCode.toString()', gradle)
self.assertNotIn('android.defaultConfig.versionCode = requestedCode', gradle)
def test_distribution_checks_run_without_the_production_manifest_or_signing_secrets(self):
checks = self.play['jobs']['checks']
@@ -101,6 +109,22 @@ class PlaystoreWorkflowTest(unittest.TestCase):
self.assertIn('tools.tests.test_playstore_signing', command)
self.assertIn('tools.tests.test_playstore_payloads', command)
def test_source_job_emits_repository_versions_even_with_old_counter_variables(self):
source = self.play['jobs']['source']['steps'][-1]['run']
gradle = (ROOT / 'app/build.gradle').read_text()
code = re.search(r'^\s*versionCode (\d+)$', gradle, re.MULTILINE).group(1)
name = re.search(r'^\s*versionName "([^"]+)"$', gradle, re.MULTILINE).group(1)
for event in ['push', 'workflow_dispatch']:
with self.subTest(event=event), tempfile.TemporaryDirectory() as directory:
output = Path(directory) / 'outputs'
environment = dict(os.environ, GITHUB_EVENT_NAME=event, GITHUB_REF='refs/heads/playstore',
SOURCE_BRANCH='playstore', VERSION=name, GITHUB_OUTPUT=str(output),
GITHUB_RUN_NUMBER='4000000000', PLAY_VERSION_CODE_BASE='999999999')
subprocess.run(['bash', '-c', source], cwd=ROOT, env=environment, check=True, capture_output=True)
values = dict(line.split('=', 1) for line in output.read_text().splitlines())
self.assertEqual(code, values['version_code'])
self.assertEqual(name, values['version'])
if __name__ == '__main__':
unittest.main()