From f386e2a59938b400094b9a6d4ce3e766196140c7 Mon Sep 17 00:00:00 2001 From: Pavlos Spanoudakis Date: Tue, 8 Sep 2026 05:42:31 +0200 Subject: [PATCH] Single-source the app version from package.json app.config.ts now reads the version from package.json, so `npm run version:set ` is the only step needed to bump. Bumped to 1.0.1. --- .github/workflows/release.yml | 2 ++ app.config.ts | 3 ++- package-lock.json | 4 ++-- package.json | 5 +++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83d0043..0bf1ed7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -170,6 +170,8 @@ jobs: - name: Create GitHub release run: | set -euo pipefail + # Paths after the tag upload as release assets - this argument is what + # attaches the APK. Text after the "#" is its label on the release page. gh release create "${{ steps.tag.outputs.tag }}" \ "dist/pubtrail-${{ steps.tag.outputs.tag }}.apk#PubTrail ${{ steps.tag.outputs.tag }} (Android APK)" \ --target "$GITHUB_SHA" \ diff --git a/app.config.ts b/app.config.ts index 2fb64d7..9bf43ef 100644 --- a/app.config.ts +++ b/app.config.ts @@ -1,10 +1,11 @@ import { ExpoConfig, ConfigContext } from 'expo/config'; +import pkg from './package.json'; export default ({ config }: ConfigContext): ExpoConfig => ({ ...config, name: "PubTrail", slug: "pubtrail", owner: "pavlos_spn", - version: "1.0.0", + version: pkg.version, orientation: "default", scheme: "pubtrail", userInterfaceStyle: "automatic", diff --git a/package-lock.json b/package-lock.json index 09382f0..05fe143 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pubtrail", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pubtrail", - "version": "1.0.0", + "version": "1.0.1", "dependencies": { "@react-native-async-storage/async-storage": "3.0.2", "@react-native-async-storage/expo-with-async-storage": "^1.0.0", diff --git a/package.json b/package.json index 8e05734..509aaf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "main": "expo-router/entry", - "version": "1.0.0", + "version": "1.0.1", "name": "pubtrail", "scripts": { "native:clean": "npx expo prebuild --clean", @@ -13,7 +13,8 @@ "test:watch": "jest --watch", "test:ci": "jest --ci --runInBand", "typecheck": "tsc --noEmit", - "prepare": "git config core.hooksPath .githooks || true" + "prepare": "git config core.hooksPath .githooks || true", + "version:set": "npm version --no-git-tag-version" }, "dependencies": { "@react-native-async-storage/async-storage": "3.0.2",