mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Addresses three review findings: 1. Coordinates now come straight from settingsRepo.stationPosition in the screen (collectAsStateWithLifecycle) — the exact same StateFlow the Settings page shows. Previously a separate ViewModel re-derived them, and it could lag behind the Settings page (user: '设置页更新了站位但漫游页死活不更新'). With the shared source the two pages can never disagree. RoamingViewModel removed; state derivation moved to RoamingState.fromPosition(). 2. Red marker placement ported faithfully from the QTH定位器 app: it is driven by the 3rd character pair of the 8-char locator (the 'ih' in OL42ih45), mapped to a 0..1 fraction (lon a=west..x=east, lat inverted a=south..x=north), then scaled to the actual center-cell size. The grid now uses the reference proportions (columns 21.4/56.2/21.4, rows 31.5/35.9/31.7) and fills the screen, so the marker lands accurately on any device. 3. Workflow now uploads a versioned APK (look4sat-<version>.apk instead of look4sat.apk). Also: Settings 'Other' card rows got vertical spacing (Arrangement.spacedBy) so the new roaming toggle is not glued to the night-mode row.
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v**
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag_name:
|
|
description: 'Release tag name (e.g. v4.4.3)'
|
|
required: false
|
|
default: ''
|
|
|
|
env:
|
|
TAG_NAME: ${{ github.event.inputs.tag_name || github.ref_name }}
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '21'
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
|
|
- name: Assemble APK
|
|
run: ./gradlew assembleRelease
|
|
|
|
- name: Sign APK
|
|
run: |
|
|
echo "${{ secrets.KEY_STORE }}" | base64 -d > keystore.jks
|
|
APK=$(find app/build/outputs/apk/release -name "*.apk" | head -1)
|
|
VERSION=${TAG_NAME#v}
|
|
SIGNED_APK="app/build/outputs/apk/release/look4sat-${VERSION}.apk"
|
|
BUILD_TOOLS=$(ls -d ${ANDROID_HOME}/build-tools/*/ | sort -V | tail -1)
|
|
${BUILD_TOOLS}apksigner sign \
|
|
--ks keystore.jks \
|
|
--ks-pass pass:${{ secrets.KEY_STORE_PASSWORD }} \
|
|
--ks-key-alias ${{ secrets.KEY_ALIAS }} \
|
|
--key-pass pass:${{ secrets.KEY_PASSWORD }} \
|
|
--out "$SIGNED_APK" \
|
|
"$APK"
|
|
rm keystore.jks
|
|
echo "SIGNED_APK=$SIGNED_APK" >> "$GITHUB_ENV"
|
|
|
|
- name: Create Release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
gh release create $TAG_NAME --title=$TAG_NAME --generate-notes
|
|
gh release upload $TAG_NAME "$SIGNED_APK"
|