chore(release): generate changelog from release notes for google play (#3591)
Some checks are pending
PR checks / rust_lint (push) Waiting to run
PR checks / build_web_app (push) Waiting to run
PR checks / build_tauri_app (push) Waiting to run
Deploy to vercel on merge / build_and_deploy (push) Waiting to run

This commit is contained in:
Huang Xin 2026-03-22 23:38:26 +08:00 committed by GitHub
parent a92c357982
commit 1e942a23b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 2 deletions

1
.gitignore vendored
View file

@ -41,6 +41,7 @@ next-env.d.ts
target
fastlane/report.xml
fastlane/metadata/android/en-US/changelogs
*.koplugin.zip

View file

@ -39,7 +39,7 @@ if grep -q 'MANAGE_EXTERNAL_STORAGE' "$MANIFEST"; then
fi
echo "🚀 Running: pnpm tauri android build"
pnpm tauri android build --config src-tauri/tauri.playstore.conf.json
# pnpm tauri android build --config src-tauri/tauri.playstore.conf.json
# --- ADD PERMISSION BACK AFTER BUILD ---
if ! grep -q 'REQUEST_INSTALL_PACKAGES' "$MANIFEST"; then
@ -61,6 +61,23 @@ if [[ -z "$GOOGLE_PLAY_JSON_KEY_FILE" ]]; then
echo "❌ GOOGLE_PLAY_JSON_KEY_FILE is not set"
exit 1
fi
# --- GENERATE CHANGELOG FOR GOOGLE PLAY ---
CHANGELOG_DIR="../../fastlane/metadata/android/en-US/changelogs"
mkdir -p "$CHANGELOG_DIR"
NOTES=$(jq -r --arg ver "$VERSION" '.releases[$ver].notes // empty | map("• " + .) | join("\n")' release-notes.json)
if [[ -n "$NOTES" ]]; then
# Google Play has a 500-character limit for release notes per language
if [[ ${#NOTES} -gt 480 ]]; then
NOTES="${NOTES:0:477}..."
fi
echo "$NOTES" > "$CHANGELOG_DIR/default.txt"
echo "📝 Release notes for v$VERSION written to changelogs/default.txt"
else
echo "⚠️ No release notes found for v$VERSION in release-notes.json"
fi
cd ../../
fastlane android upload_production

View file

@ -12,7 +12,7 @@ platform :android do
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_screenshots: true,
skip_upload_changelogs: true
skip_upload_changelogs: false
)
end