Skip to content

Commit 2258c14

Browse files
committed
chore(release): beta v0.2.14
1 parent d34497f commit 2258c14

6 files changed

Lines changed: 60 additions & 51 deletions

File tree

.github/workflows/android-release.yml

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -72,61 +72,54 @@ jobs:
7272
- name: Decode keystore
7373
run: echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 --decode > "$RUNNER_TEMP/release.keystore"
7474

75-
# ── APK (for sideloading / GitHub release) ────────────────────────────
76-
77-
- name: Build release APK (arm64)
78-
env:
79-
NDK_HOME: ${{ env.NDK_HOME }}
80-
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
81-
run: yarn tauri android build --apk true --target aarch64
82-
83-
- name: Sign APK
75+
- name: Set build variant (beta vs release)
76+
id: variant
8477
run: |
85-
UNSIGNED=$(find src-tauri/gen/android/app/build/outputs/apk -name "*.apk" | head -1)
86-
echo "Found unsigned APK: $UNSIGNED"
87-
88-
BUILD_TOOLS=$(ls "$ANDROID_SDK_ROOT/build-tools" | sort -V | tail -1)
89-
SIGNED="dota-keeper-${{ steps.version.outputs.VERSION }}-android.apk"
90-
91-
"$ANDROID_SDK_ROOT/build-tools/$BUILD_TOOLS/apksigner" sign \
92-
--ks "$RUNNER_TEMP/release.keystore" \
93-
--ks-key-alias "${{ secrets.ANDROID_KEY_ALIAS }}" \
94-
--ks-pass "pass:${{ secrets.ANDROID_STORE_PASSWORD }}" \
95-
--key-pass "pass:${{ secrets.ANDROID_KEY_PASSWORD }}" \
96-
--out "$SIGNED" \
97-
"$UNSIGNED"
98-
99-
echo "SIGNED_APK=$SIGNED" >> $GITHUB_ENV
100-
101-
- name: Upload APK as workflow artifact
102-
uses: actions/upload-artifact@v4
103-
with:
104-
name: dota-keeper-${{ steps.version.outputs.VERSION }}-android
105-
path: ${{ env.SIGNED_APK }}
106-
retention-days: 30
107-
108-
- name: Attach APK to GitHub release
109-
env:
110-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
if [ "${{ github.ref }}" = "refs/heads/beta" ]; then
79+
echo "IS_BETA=true" >> $GITHUB_ENV
80+
echo "RELEASE_TAG=v${{ steps.version.outputs.VERSION }}-beta" >> $GITHUB_ENV
81+
echo "TAURI_CONFIG=src-tauri/tauri.beta.conf.json" >> $GITHUB_ENV
82+
echo "ANDROID_APP_ID=com.volthawk.dota_keeper_beta" >> $GITHUB_ENV
83+
else
84+
echo "IS_BETA=false" >> $GITHUB_ENV
85+
echo "RELEASE_TAG=v${{ steps.version.outputs.VERSION }}" >> $GITHUB_ENV
86+
echo "TAURI_CONFIG=" >> $GITHUB_ENV
87+
echo "ANDROID_APP_ID=com.volthawk.dota_keeper" >> $GITHUB_ENV
88+
fi
89+
90+
- name: Patch applicationId for beta
91+
if: env.IS_BETA == 'true'
11192
run: |
112-
gh release upload "v${{ steps.version.outputs.VERSION }}" "${{ env.SIGNED_APK }}" --clobber || \
113-
echo "⚠️ Could not upload to release (may not exist yet). APK is available as a workflow artifact."
93+
sed -i \
94+
's/applicationId = "com.volthawk.dota_keeper"/applicationId = "com.volthawk.dota_keeper_beta"/' \
95+
src-tauri/gen/android/app/build.gradle.kts
96+
echo "applicationId patched to com.volthawk.dota_keeper_beta"
11497
11598
# ── AAB (for Google Play Store) ────────────────────────────────────────
11699

117100
- name: Build release AAB (all ABIs)
118-
if: ${{ inputs.upload_to_play_store == true }}
119101
env:
120102
NDK_HOME: ${{ env.NDK_HOME }}
121103
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
122-
run: yarn tauri android build --aab
104+
PUBLIC_SUPABASE_URL: ${{ secrets.PUBLIC_SUPABASE_URL }}
105+
PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.PUBLIC_SUPABASE_ANON_KEY }}
106+
run: |
107+
if [ -n "$TAURI_CONFIG" ]; then
108+
yarn tauri android build --aab --config "$TAURI_CONFIG"
109+
else
110+
yarn tauri android build --aab
111+
fi
123112
124113
- name: Sign AAB
125-
if: ${{ inputs.upload_to_play_store == true }}
126114
run: |
127115
UNSIGNED=$(find src-tauri/gen/android/app/build/outputs/bundle -name "*.aab" | head -1)
128116
echo "Found unsigned AAB: $UNSIGNED"
129-
SIGNED="dota-keeper-${{ steps.version.outputs.VERSION }}.aab"
117+
118+
if [ "$IS_BETA" = "true" ]; then
119+
SIGNED="dota-keeper-${{ steps.version.outputs.VERSION }}-beta-android.aab"
120+
else
121+
SIGNED="dota-keeper-${{ steps.version.outputs.VERSION }}-android.aab"
122+
fi
130123
131124
jarsigner -verbose \
132125
-sigalg SHA256withRSA \
@@ -140,12 +133,26 @@ jobs:
140133
141134
echo "SIGNED_AAB=$SIGNED" >> $GITHUB_ENV
142135
136+
- name: Upload AAB as workflow artifact
137+
uses: actions/upload-artifact@v4
138+
with:
139+
name: dota-keeper-${{ steps.version.outputs.VERSION }}-android
140+
path: ${{ env.SIGNED_AAB }}
141+
retention-days: 30
142+
143+
- name: Attach AAB to GitHub release
144+
env:
145+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146+
run: |
147+
gh release upload "$RELEASE_TAG" "$SIGNED_AAB" --clobber || \
148+
echo "⚠️ Could not upload to release (may not exist yet). AAB is available as a workflow artifact."
149+
143150
- name: Upload AAB to Google Play (internal track)
144151
if: ${{ inputs.upload_to_play_store == true }}
145152
uses: r0adkll/upload-google-play@v1
146153
with:
147154
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
148-
packageName: com.volthawk.dota_keeper
155+
packageName: ${{ env.ANDROID_APP_ID }}
149156
releaseFiles: ${{ env.SIGNED_AAB }}
150157
track: internal
151158
status: completed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dota-keeper",
3-
"version": "0.2.13",
3+
"version": "0.2.14",
44
"description": "",
55
"type": "module",
66
"scripts": {

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dota-keeper"
3-
version = "0.2.13"
3+
version = "0.2.14"
44
description = "A Tauri App"
55
authors = ["stringhandler"]
66
edition = "2021"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Dota Keeper",
4-
"version": "0.2.13",
4+
"version": "0.2.14",
55
"identifier": "com.volthawk.dota-keeper",
66
"build": {
77
"beforeDevCommand": "yarn dev",

src/lib/FeedbackModal.svelte

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import { getVersion } from "@tauri-apps/api/app";
44
import { onMount } from "svelte";
55
import { showToast } from "$lib/toast.js";
6-
import { PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_ANON_KEY } from "$env/static/public";
6+
7+
const SUPABASE_URL = import.meta.env.PUBLIC_SUPABASE_URL ?? "";
8+
const SUPABASE_ANON_KEY = import.meta.env.PUBLIC_SUPABASE_ANON_KEY ?? "";
79
810
let { onClose = () => {} } = $props();
911
@@ -38,7 +40,7 @@
3840
async function handleSubmit() {
3941
if (!category || !feedbackText.trim()) return;
4042
41-
if (!PUBLIC_SUPABASE_URL || !PUBLIC_SUPABASE_ANON_KEY) {
43+
if (!SUPABASE_URL || !SUPABASE_ANON_KEY) {
4244
showToast("Feedback is not configured yet.", "error");
4345
return;
4446
}
@@ -54,11 +56,11 @@
5456
platform: getPlatform(),
5557
};
5658
57-
const res = await fetch(`${PUBLIC_SUPABASE_URL}/rest/v1/feedback`, {
59+
const res = await fetch(`${SUPABASE_URL}/rest/v1/feedback`, {
5860
method: "POST",
5961
headers: {
60-
apikey: PUBLIC_SUPABASE_ANON_KEY,
61-
Authorization: `Bearer ${PUBLIC_SUPABASE_ANON_KEY}`,
62+
apikey: SUPABASE_ANON_KEY,
63+
Authorization: `Bearer ${SUPABASE_ANON_KEY}`,
6264
"Content-Type": "application/json",
6365
Prefer: "return=minimal",
6466
},

0 commit comments

Comments
 (0)