ci: add GitHub Actions workflow to build & release Scale Gateway APK
- Add .github/workflows/build-scale-gateway.yml Triggers on push to main (evershelf-scale-gateway/** path filter) Builds debug APK with Gradle/JDK 17, renames to evershelf-scale-gateway.apk Creates/updates 'latest' GitHub Release so the direct download URL resolves - Bump web app version v1.2.0 -> v1.3.0 (index.html) - Bump Android versionCode 1->2, versionName 1.0.0->1.3.0 (app/build.gradle.kts)
This commit is contained in:
@@ -0,0 +1,69 @@
|
|||||||
|
name: Build & Release Scale Gateway APK
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'evershelf-scale-gateway/**'
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build APK
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
- name: Set up Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v3
|
||||||
|
|
||||||
|
- name: Make gradlew executable
|
||||||
|
run: chmod +x evershelf-scale-gateway/gradlew
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
|
|
||||||
|
- name: Build debug APK
|
||||||
|
run: ./gradlew assembleDebug --no-daemon
|
||||||
|
working-directory: evershelf-scale-gateway
|
||||||
|
|
||||||
|
- name: Rename APK
|
||||||
|
run: |
|
||||||
|
mkdir -p artifacts
|
||||||
|
cp evershelf-scale-gateway/app/build/outputs/apk/debug/app-debug.apk \
|
||||||
|
artifacts/evershelf-scale-gateway.apk
|
||||||
|
|
||||||
|
- name: Get version name
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
VERSION=$(grep 'versionName' evershelf-scale-gateway/app/build.gradle.kts \
|
||||||
|
| grep -oP '"\K[^"]+')
|
||||||
|
echo "name=$VERSION" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Delete existing latest release (if any)
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
gh release delete latest --yes || true
|
||||||
|
|
||||||
|
- name: Create GitHub Release and upload APK
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
gh release create latest \
|
||||||
|
--title "EverShelf Scale Gateway v${{ steps.version.outputs.name }}" \
|
||||||
|
--notes "Automated release of EverShelf Scale Gateway v${{ steps.version.outputs.name }}.
|
||||||
|
|
||||||
|
## Download
|
||||||
|
Download the APK below and install it on your Android device (Android 7.0+).
|
||||||
|
Make sure to allow installation from unknown sources in your device settings." \
|
||||||
|
--latest \
|
||||||
|
artifacts/evershelf-scale-gateway.apk
|
||||||
@@ -11,8 +11,8 @@ android {
|
|||||||
applicationId = "it.dadaloop.evershelf.scalegate"
|
applicationId = "it.dadaloop.evershelf.scalegate"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 1
|
versionCode = 2
|
||||||
versionName = "1.0.0"
|
versionName = "1.3.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@
|
|||||||
<!-- Top Header -->
|
<!-- Top Header -->
|
||||||
<header class="app-header">
|
<header class="app-header">
|
||||||
<div class="header-content">
|
<div class="header-content">
|
||||||
<h1 class="header-title" onclick="showPage('dashboard')"><span data-i18n="nav.title">🏠 EverShelf</span><span class="header-version">v1.2.0</span></h1>
|
<h1 class="header-title" onclick="showPage('dashboard')"><span data-i18n="nav.title">🏠 EverShelf</span><span class="header-version">v1.3.0</span></h1>
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<span id="scale-status-indicator" class="scale-status-indicator scale-status-disconnected" style="display:none" data-i18n-title="scale.status_disconnected" title="⚖️ Bilancia">⚖️</span>
|
<span id="scale-status-indicator" class="scale-status-indicator scale-status-disconnected" style="display:none" data-i18n-title="scale.status_disconnected" title="⚖️ Bilancia">⚖️</span>
|
||||||
<button class="header-scan-btn header-gemini-btn" onclick="showPage('chat')" title="Chat con Gemini" data-i18n-title="chat.title">
|
<button class="header-scan-btn header-gemini-btn" onclick="showPage('chat')" title="Chat con Gemini" data-i18n-title="chat.title">
|
||||||
|
|||||||
Reference in New Issue
Block a user