git.iko.soy/parseable-android
on master help sign in
Switch to date-based versioning for releases (#19)

* Use date-based versioning and create proper releases on push to master Replace static version (1.0.0 / versionCode 1) with a date-based scheme computed at build time from the current UTC timestamp: - versionName: yyyy.MM.dd.HHmm (e.g. 2026.02.15.1430) - versionCode: epoch minutes (monotonically increasing integer) Change the CI workflow's push-to-master job from a rolling prerelease (latest-master tag, constantly deleted and recreated) to a proper release tagged v{yyyy.MM.dd.HHmm} with auto-generated release notes. https://claude.ai/code/session_015anFahXgSRC172Jwf8AQx3 * Use git commit timestamp instead of build time for versioning Makes versions reproducible — the same commit always produces the same versionName and versionCode regardless of when or where it is built. https://claude.ai/code/session_015anFahXgSRC172Jwf8AQx3 * Prevent concurrent release jobs without canceling previous runs Move concurrency from workflow-level to job-level so each job gets its own policy. Build jobs still cancel-in-progress for the same ref, but release jobs queue and run serially. https://claude.ai/code/session_015anFahXgSRC172Jwf8AQx3 * Add Obtainium installation instructions to README https://claude.ai/code/session_015anFahXgSRC172Jwf8AQx3 --------- Co-authored-by: Claude <noreply@anthropic.com>

commit54bb88e6a6e1b3c5afc127fb7a8605d2164832f3 authoriko <mail@iko.soy> dateMon 16 Feb 2026, 01:26 (8 months ago) parent9596377
4 files changed+43−32
.github/workflows/ci.yml+19−26 README.md+11 app/build.gradle.kts+13−2 gradle/libs.versions.toml−4
.github/workflows/ci.yml+19−26
@@ -6,14 +6,13 @@ on:
66 push:
77 branches: [ master, main ]
88
9−concurrency:
10− group: ci-${{ github.ref }}
11− cancel-in-progress: true
12−
139jobs:
1410 build:
1511 name: Build & Lint
1612 runs-on: ubuntu-latest
13+ concurrency:
14+ group: ci-build-${{ github.ref }}
15+ cancel-in-progress: true
1716
1817 steps:
1918 - name: Checkout code
@@ -59,11 +58,14 @@ jobs:
5958 path: app/build/reports/lint-results-release.html
6059 retention-days: 14
6160
62− prerelease:
63− name: Create Prerelease
61+ release:
62+ name: Create Release
6463 needs: build
6564 if: github.event_name == 'push'
6665 runs-on: ubuntu-latest
66+ concurrency:
67+ group: release
68+ cancel-in-progress: false
6769 permissions:
6870 contents: write
6971
@@ -71,6 +73,11 @@ jobs:
7173 - name: Checkout code
7274 uses: actions/checkout@v4
7375
76+ - name: Set version from commit timestamp
77+ run: |
78+ VERSION_NAME=$(TZ=UTC git log -1 --format='%cd' --date=format-local:'%Y.%m.%d.%H%M')
79+ echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
80+
7481 - name: Set up JDK 17
7582 uses: actions/setup-java@v4
7683 with:
@@ -89,31 +96,17 @@ jobs:
8996 - name: Build release APK
9097 run: ./gradlew assembleRelease
9198
92− - name: Rename APK with commit SHA
99+ - name: Rename APK with version
93100 run: |
94− SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
95101 for apk in app/build/outputs/apk/release/*.apk; do
96− mv "$apk" "app/build/outputs/apk/release/parseable-android-${SHORT_SHA}.apk"
102+ mv "$apk" "app/build/outputs/apk/release/parseable-android-${VERSION_NAME}.apk"
97103 done
98104
99− - name: Delete existing latest-master tag and release
100− env:
101− GH_TOKEN: ${{ github.token }}
102− run: |
103− gh release delete latest-master --yes || true
104− git push origin :refs/tags/latest-master || true
105−
106− - name: Create prerelease
105+ - name: Create release
107106 uses: softprops/action-gh-release@v2
108107 with:
109− tag_name: latest-master
110− name: "Latest Master Build (${{ github.sha }})"
111− prerelease: true
112− body: |
113− Automated prerelease from commit ${{ github.sha }}.
114−
115− **Commit:** [`${{ github.sha }}`](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
116− **Branch:** `${{ github.ref_name }}`
117− **Triggered by:** @${{ github.actor }}
108+ tag_name: v${{ env.VERSION_NAME }}
109+ name: v${{ env.VERSION_NAME }}
110+ generate_release_notes: true
118111 files: |
119112 app/build/outputs/apk/release/*.apk
README.md+11
@@ -43,6 +43,17 @@ An Android client for [Parseable](https://www.parseable.com/), the open-source l
4343| `/api/v1/alerts` | GET | List alerts |
4444| `/api/v1/user` | GET | List users |
4545
46+## Installation
47+
48+The recommended way to install Parseable Android is via [Obtainium](https://github.com/ImranR98/Obtainium), which will automatically notify you of new releases.
49+
50+1. Install [Obtainium](https://github.com/ImranR98/Obtainium) on your device.
51+2. Open Obtainium and tap **Add App**.
52+3. Enter this repository URL: `https://github.com/ilyakooo0/parseable-android`
53+4. Tap **Add** — Obtainium will fetch the latest release APK and install it.
54+
55+Updates will be detected automatically whenever a new release is published.
56+
4657## Building
4758
4859```bash
app/build.gradle.kts+13−2
@@ -1,3 +1,7 @@
1+import java.time.Instant
2+import java.time.ZoneOffset
3+import java.time.format.DateTimeFormatter
4+
15plugins {
26 alias(libs.plugins.android.application)
37 alias(libs.plugins.kotlin.android)
@@ -7,6 +11,13 @@ plugins {
711 alias(libs.plugins.ksp)
812}
913
14+val commitEpoch = providers.exec {
15+ commandLine("git", "log", "-1", "--format=%ct")
16+}.standardOutput.asText.get().trim().toLong()
17+val commitTime = Instant.ofEpochSecond(commitEpoch).atZone(ZoneOffset.UTC)
18+val dateVersionName = commitTime.format(DateTimeFormatter.ofPattern("yyyy.MM.dd.HHmm"))
19+val dateVersionCode = (commitEpoch / 60).toInt()
20+
1021android {
1122 namespace = "com.parseable.android"
1223 compileSdk = 35
@@ -15,8 +26,8 @@ android {
1526 applicationId = "com.parseable.android"
1627 minSdk = 26
1728 targetSdk = 35
18− versionCode = libs.versions.appVersionCode.get().toInt()
19− versionName = libs.versions.appVersionName.get()
29+ versionCode = dateVersionCode
30+ versionName = dateVersionName
2031
2132 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2233 }
gradle/libs.versions.toml−4
@@ -1,8 +1,4 @@
11[versions]
2−# App versioning
3−appVersionCode = "1"
4−appVersionName = "1.0.0"
5−
62agp = "8.7.3"
73kotlin = "2.1.0"
84ksp = "2.1.0-1.0.29"