From 78bdc0e3b505380f4da97effa0e64347dec7d058 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Mon, 28 Sep 2026 11:52:02 +0000 Subject: [PATCH] chore(release): bump to 0.2.1 and check the version at release time --- .github/workflows/pr-release-publish.yml | 6 ++++-- .github/workflows/release.yml | 4 ++++ app/build.gradle | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-release-publish.yml b/.github/workflows/pr-release-publish.yml index 72ef506be7..8104175657 100644 --- a/.github/workflows/pr-release-publish.yml +++ b/.github/workflows/pr-release-publish.yml @@ -79,8 +79,10 @@ jobs: } stable=$(package_line "$RUNNER_TEMP/stable/DroidDeck-$stable_tag.apk") candidate=$(package_line "${apks[0]}") - [[ "$stable" =~ ^com\.droiddeck\.launcher\ [0-9]+$ && "$candidate" == "$stable" ]] || { - echo "::error::PR package/versionCode '$candidate' differs from stable '$stable'"; exit 1; + # Same package, and a versionCode no lower than stable's, so the APK installs over it. + [[ "$stable" =~ ^com\.droiddeck\.launcher\ [0-9]+$ && "$candidate" =~ ^com\.droiddeck\.launcher\ [0-9]+$ && + ${candidate##* } -ge ${stable##* } ]] || { + echo "::error::PR package/versionCode '$candidate' cannot install over stable '$stable'"; exit 1; } current=$(gh api "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER") diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2620b96dfa..870c6b5f24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,10 @@ jobs: run: | set -euo pipefail [[ $VERSION =~ ^[0-9A-Za-z._-]+$ ]] || { echo "::error::version '$VERSION': letters, digits, . _ - only"; exit 1; } + name=$(sed -n 's/^ *versionName "\(.*\)"$/\1/p' app/build.gradle) + [[ $VERSION == "$name" || $VERSION == "$name"-* ]] || { + echo "::error::version '$VERSION' does not match versionName '$name' in app/build.gradle: bump versionName and versionCode first"; exit 1; + } runs=$(gh run list -R "$GITHUB_REPOSITORY" --workflow build.yml --branch main --commit "$GITHUB_SHA" \ --status success --json databaseId,event,headSha -L 20) id=$(jq -r --arg sha "$GITHUB_SHA" \ diff --git a/app/build.gradle b/app/build.gradle index 666501a655..09585d08f3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,8 +63,8 @@ android { // file out of its own data directory, and this app's entire job is to exec a rootfs: // proot, gamescope, the Steam client and everything it launches all live under files/. targetSdkVersion 28 - versionCode 8 - versionName "0.1.7" + versionCode 9 + versionName "0.2.1" buildConfigField "String", "BUILD_LABEL", "\"${escapedBuildLabel}\"" ndk {