diff --git a/.github/scripts/update_versions.sh b/.github/scripts/update_versions.sh index 6ce05972..cd9eabb5 100644 --- a/.github/scripts/update_versions.sh +++ b/.github/scripts/update_versions.sh @@ -24,8 +24,8 @@ version_code=$(awk -F '"' '/versionCode = "/{print $2}' "$version_file") # Increment versionCode by 1 ((version_code++)) -# Increment versionName by 0.01 -version_name=$(echo "$version_name + 0.01" | bc) +# Increment versionName by 0.01 with 2-decimal precision +version_name=$(awk -v v="$version_name" 'BEGIN { printf "%.2f", v + 0.01 }') # Update the file with the new version information sed "s/versionName = \".*\"/versionName = \"$version_name\"/" "$version_file" > "$version_file.tmp" @@ -35,4 +35,3 @@ sed "s/versionCode = \".*\"/versionCode = \"$version_code\"/" "$version_file" > mv "$version_file.tmp" "$version_file" echo "Updated versionName to $version_name and versionCode to $version_code in $version_file" - diff --git a/.github/workflows/android_deploy_beta.yml b/.github/workflows/android_deploy_beta.yml index 266b20ed..f0e9b42d 100644 --- a/.github/workflows/android_deploy_beta.yml +++ b/.github/workflows/android_deploy_beta.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - run: | echo "${{ secrets.KEYSTORE }}" > keystore.jks.asc @@ -26,7 +28,7 @@ jobs: id: changelog env: TAG_PREFIX: beta- - run: ./.github/scripts/generate_changelog.sh + run: bash ./.github/scripts/generate_changelog.sh - uses: ruby/setup-ruby@v1 with: @@ -87,8 +89,8 @@ jobs: run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git add -A - git commit -m "release(beta): v${{ steps.changelog.outputs.VERSION_NAME }} (code ${{ steps.changelog.outputs.VERSION_CODE }})" + git add . + git commit -a -m "release(beta): v${{ steps.changelog.outputs.VERSION_NAME }} (code ${{ steps.changelog.outputs.VERSION_CODE }})" || echo "No changes to commit" # Create an annotated tag for this release TAG_NAME="${{ steps.changelog.outputs.TAG_NAME }}" if [ -n "$TAG_NAME" ]; then diff --git a/.github/workflows/android_deploy_prod.yml b/.github/workflows/android_deploy_prod.yml index 8b8b00b1..e8b3c21d 100644 --- a/.github/workflows/android_deploy_prod.yml +++ b/.github/workflows/android_deploy_prod.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - run: | echo "${{ secrets.KEYSTORE }}" > keystore.jks.asc @@ -26,7 +28,7 @@ jobs: id: changelog env: TAG_PREFIX: release- - run: ./.github/scripts/generate_changelog.sh + run: bash ./.github/scripts/generate_changelog.sh - uses: ruby/setup-ruby@v1 with: @@ -87,8 +89,8 @@ jobs: run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git add -A - git commit -m "release: v${{ steps.changelog.outputs.VERSION_NAME }} (code ${{ steps.changelog.outputs.VERSION_CODE }})" + git add . + git commit -a -m "release: v${{ steps.changelog.outputs.VERSION_NAME }} (code ${{ steps.changelog.outputs.VERSION_CODE }})" || echo "No changes to commit" # Create an annotated tag for this release TAG_NAME="${{ steps.changelog.outputs.TAG_NAME }}" if [ -n "$TAG_NAME" ]; then diff --git a/.github/workflows/github_release_apk.yml b/.github/workflows/github_release_apk.yml index a2f71354..b1a1a912 100644 --- a/.github/workflows/github_release_apk.yml +++ b/.github/workflows/github_release_apk.yml @@ -4,13 +4,11 @@ on: workflow_dispatch: inputs: tag_name: - description: "Tag to create the release from (e.g., v1.2.3)" + description: "Tag to create the release from (e.g., release-v1.2.3)" required: false type: string push: tags: - - "v*" - - "beta-*" - "release-*" permissions: @@ -90,7 +88,9 @@ jobs: - name: Generate release notes (shared) id: notes - run: ./.github/scripts/generate_changelog.sh + env: + TAG_PREFIX: release- + run: bash ./.github/scripts/generate_changelog.sh - name: Derive release tag id: tag @@ -105,6 +105,10 @@ jobs: TAG="${{ steps.notes.outputs.TAG_NAME }}" fi fi + TAG=$(echo "$TAG" | tr -d ' \t\n\r') + if [ -z "$TAG" ]; then + TAG="release-${GITHUB_SHA::7}" + fi echo "tag=$TAG" >> "$GITHUB_OUTPUT" - name: Create GitHub Release and upload APK @@ -112,6 +116,7 @@ jobs: with: tag_name: ${{ steps.tag.outputs.tag }} name: ${{ steps.tag.outputs.tag }} + target_commitish: ${{ github.sha }} draft: false prerelease: ${{ contains(steps.tag.outputs.tag, 'alpha') || contains(steps.tag.outputs.tag, 'beta') || contains(steps.tag.outputs.tag, 'rc') }} body_path: ${{ steps.notes.outputs.notes_path }} diff --git a/.github/workflows/version_updater.yml b/.github/workflows/version_updater.yml index 3099c890..92a07465 100644 --- a/.github/workflows/version_updater.yml +++ b/.github/workflows/version_updater.yml @@ -2,6 +2,23 @@ name: Android Version Update on: workflow_dispatch: + inputs: + channel: + description: "Release channel (beta or release)" + required: false + default: "release" + type: choice + options: + - beta + - release + bump: + description: "Bump versionName/Code before tagging" + required: false + default: "false" + type: choice + options: + - "false" + - "true" permissions: contents: write @@ -14,18 +31,43 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Update Version + if: ${{ github.event.inputs.bump == 'true' }} run: bash ./.github/scripts/update_versions.sh + - name: Generate changelog and tag + id: changelog + env: + TAG_PREFIX: ${{ github.event.inputs.channel == 'beta' && 'beta-' || 'release-' }} + run: bash ./.github/scripts/generate_changelog.sh + - name: Commit files run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git commit -a -m "update version" + git add . + if [ "${{ github.event.inputs.channel }}" = "beta" ]; then + git commit -m "release(beta): v${{ steps.changelog.outputs.VERSION_NAME }} (code ${{ steps.changelog.outputs.VERSION_CODE }})" || echo "No changes to commit" + else + git commit -m "release: v${{ steps.changelog.outputs.VERSION_NAME }} (code ${{ steps.changelog.outputs.VERSION_CODE }})" || echo "No changes to commit" + fi + # Create an annotated tag for this release + TAG_NAME="${{ steps.changelog.outputs.TAG_NAME }}" + if [ -n "$TAG_NAME" ]; then + # Avoid failure if tag already exists in repo history + if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then + echo "Tag $TAG_NAME already exists; skipping create" + else + git tag -a "$TAG_NAME" -m "Release $TAG_NAME" + fi + fi - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.PUSH_TOKEN }} - branch: ${{ github.ref }} \ No newline at end of file + branch: ${{ github.ref }} + tags: true diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md new file mode 100644 index 00000000..6d662ee1 --- /dev/null +++ b/RELEASE_NOTES.md @@ -0,0 +1,48 @@ +release-v1.06 – 2025-09-09 + +Changes: + +- refactor: improve versioning and deployment workflows (b06618b) — stslex +- feat: add fastlane metadata to release workflows (a5da73b) — stslex +- test: add workflow tests for GitHub Actions (bbe133c) — stslex +- feat: implement changelog generation and automated GitHub releases (d04f49a) — stslex +- fix: correct typos in package names and update assertions (8c91802) — stslex +- integrate Firebase Analytics and Crashlytics, update Proguard rules, and refactor deployment workflows (215eab8) — stslex +- feat: integrate Firebase Analytics and Crashlytics and refactor application setup (1d0d31d) — stslex +- feat: implement search and filter functionality in home screen and add corresponding tests (6d19fb1) — stslex +- feat: enhance Home screen with charts and date picker functionality (774c6fc) — stslex +- feat: implement Home screen with tabs and charts functionality (8cbb5c9) — stslex +- test: add query tests for ExerciseDao and ExerciseRepository (f37af66) — stslex +- feat: add search functionality for exercises with query support (ad9c19e) — stslex +- chore: update version to 1.04 and add version updater workflow (df93774) — stslex +- fix: update JDK version from 17 to 21 in deployment workflows (cd64370) — stslex +- fix: specify type for dao.delete in ExerciseRepositoryImplTest (5a00c6c) — stslex +- add initial release with MVP functionality and setup deployment workflows (c9aad4f) — stslex +- implement selection mode with haptic feedback and update action button icons (4d1fd26) — stslex +- refactor project structure and update application identifiers for dev and store variants (95018bb) — stslex +- update dependency versions for Kotlin, Android Gradle Plugin, and Material components (3192a9f) — stslex +- bump version to 1.02 and update version code to 3 (82d163b) — stslex +- update Privacy Policy to clarify data collection practices and add Russian translation (eb73514) — stslex +- update AndroidManifest and launcher icon for improved back navigation and adaptive icon support (95e97fe) — stslex +- refactor ExerciseDao to improve search queries and add update/delete tests (7b0c2e2) — stslex +- refactor ExercisePropertyTextField to enhance dropdown menu icon animation and visibility (075c243) — stslex +- add common handler for exercise feature and implement menu item selection (b5b627c) — stslex +- add date handling with DateProperty and integrate date picker in exercise feature (fca239d) — stslex +- implement shared transition animations in navigation and update back navigation logic (05c1bca) — stslex +- fix nav issues (c4e54f8) — stslex +- migrate to jepack navigation (8865d14) — stslex +- add hash validator for changes (f1cec95) — stslex +- refactor create/edit note (37570c6) — stslex +- change exercise path, fix scopes for koin (16aac80) — stslex +- fix ci (1233b47) — stslex +- fix pathes for dialog screens (2927132) — stslex +- init dialog navigation (1193e03) — stslex +- replace scaffold (ceffff3) — stslex +- initialize gome screen with home store (6cfc29e) — stslex +- Android SDK 36 requires Java 21 (have Java 17) (1826c1d) — stslex +- db with kotlin uuid (6b78c4d) — stslex +- fix room database UUID generation (fb08ff1) — stslex +- init exercise db (f490119) — stslex +- remove unused cache, fix path for build (6dccbc2) — stslex +- inital setup for nav, arch, ui core setup, ci init (72a5071) — stslex +- Initial commit (b6621be) — stslex \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 5659b7e8..068ec79a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -8,18 +8,21 @@ platform :android do desc "Submit a new Beta Build to Crashlytics Beta" lane :crashlytics do + changelog_from_git_commits gradle(task: "clean :app:store:assembleRelease") crashlytics end desc "Deploy a beta version to the Google Play" lane :beta do + changelog_from_git_commits gradle(task: "clean :app:store:bundle") upload_to_play_store(track: 'beta') end desc "Deploy a new version to the Google Play" lane :deploy do + changelog_from_git_commits gradle(task: "clean :app:store:bundle") upload_to_play_store end diff --git a/fastlane/metadata/android/en-US/changelogs/6.txt b/fastlane/metadata/android/en-US/changelogs/6.txt deleted file mode 100644 index ffeb2326..00000000 --- a/fastlane/metadata/android/en-US/changelogs/6.txt +++ /dev/null @@ -1,8 +0,0 @@ -- Features - - integrate Firebase Analytics and Crashlytics; refactor app setup - - implement search and filter in Home; add related tests - - enhance Home with charts and date picker - - implement Home with tabs and charts - - add exercise search with query support -- Tests - - add query tests for ExerciseDao and ExerciseRepository diff --git a/fastlane/metadata/android/en-US/changelogs/7.txt b/fastlane/metadata/android/en-US/changelogs/7.txt new file mode 100644 index 00000000..6d662ee1 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/7.txt @@ -0,0 +1,48 @@ +release-v1.06 – 2025-09-09 + +Changes: + +- refactor: improve versioning and deployment workflows (b06618b) — stslex +- feat: add fastlane metadata to release workflows (a5da73b) — stslex +- test: add workflow tests for GitHub Actions (bbe133c) — stslex +- feat: implement changelog generation and automated GitHub releases (d04f49a) — stslex +- fix: correct typos in package names and update assertions (8c91802) — stslex +- integrate Firebase Analytics and Crashlytics, update Proguard rules, and refactor deployment workflows (215eab8) — stslex +- feat: integrate Firebase Analytics and Crashlytics and refactor application setup (1d0d31d) — stslex +- feat: implement search and filter functionality in home screen and add corresponding tests (6d19fb1) — stslex +- feat: enhance Home screen with charts and date picker functionality (774c6fc) — stslex +- feat: implement Home screen with tabs and charts functionality (8cbb5c9) — stslex +- test: add query tests for ExerciseDao and ExerciseRepository (f37af66) — stslex +- feat: add search functionality for exercises with query support (ad9c19e) — stslex +- chore: update version to 1.04 and add version updater workflow (df93774) — stslex +- fix: update JDK version from 17 to 21 in deployment workflows (cd64370) — stslex +- fix: specify type for dao.delete in ExerciseRepositoryImplTest (5a00c6c) — stslex +- add initial release with MVP functionality and setup deployment workflows (c9aad4f) — stslex +- implement selection mode with haptic feedback and update action button icons (4d1fd26) — stslex +- refactor project structure and update application identifiers for dev and store variants (95018bb) — stslex +- update dependency versions for Kotlin, Android Gradle Plugin, and Material components (3192a9f) — stslex +- bump version to 1.02 and update version code to 3 (82d163b) — stslex +- update Privacy Policy to clarify data collection practices and add Russian translation (eb73514) — stslex +- update AndroidManifest and launcher icon for improved back navigation and adaptive icon support (95e97fe) — stslex +- refactor ExerciseDao to improve search queries and add update/delete tests (7b0c2e2) — stslex +- refactor ExercisePropertyTextField to enhance dropdown menu icon animation and visibility (075c243) — stslex +- add common handler for exercise feature and implement menu item selection (b5b627c) — stslex +- add date handling with DateProperty and integrate date picker in exercise feature (fca239d) — stslex +- implement shared transition animations in navigation and update back navigation logic (05c1bca) — stslex +- fix nav issues (c4e54f8) — stslex +- migrate to jepack navigation (8865d14) — stslex +- add hash validator for changes (f1cec95) — stslex +- refactor create/edit note (37570c6) — stslex +- change exercise path, fix scopes for koin (16aac80) — stslex +- fix ci (1233b47) — stslex +- fix pathes for dialog screens (2927132) — stslex +- init dialog navigation (1193e03) — stslex +- replace scaffold (ceffff3) — stslex +- initialize gome screen with home store (6cfc29e) — stslex +- Android SDK 36 requires Java 21 (have Java 17) (1826c1d) — stslex +- db with kotlin uuid (6b78c4d) — stslex +- fix room database UUID generation (fb08ff1) — stslex +- init exercise db (f490119) — stslex +- remove unused cache, fix path for build (6dccbc2) — stslex +- inital setup for nav, arch, ui core setup, ci init (72a5071) — stslex +- Initial commit (b6621be) — stslex \ No newline at end of file diff --git a/fastlane/metadata/android/ru-RU/changelogs/6.txt b/fastlane/metadata/android/ru-RU/changelogs/6.txt deleted file mode 100644 index d8fae15d..00000000 --- a/fastlane/metadata/android/ru-RU/changelogs/6.txt +++ /dev/null @@ -1,8 +0,0 @@ -- Новые возможности - - интеграция Firebase Analytics и Crashlytics; рефакторинг настройки приложения - - реализован поиск и фильтрация на главном экране; добавлены соответствующие тесты - - улучшения главного экрана: графики и выбор даты - - реализован главный экран с вкладками и графиками - - добавлен поиск упражнений с поддержкой запросов -- Тесты - - добавлены тесты запросов для ExerciseDao и ExerciseRepository diff --git a/fastlane/metadata/android/ru-RU/changelogs/7.txt b/fastlane/metadata/android/ru-RU/changelogs/7.txt new file mode 100644 index 00000000..6d662ee1 --- /dev/null +++ b/fastlane/metadata/android/ru-RU/changelogs/7.txt @@ -0,0 +1,48 @@ +release-v1.06 – 2025-09-09 + +Changes: + +- refactor: improve versioning and deployment workflows (b06618b) — stslex +- feat: add fastlane metadata to release workflows (a5da73b) — stslex +- test: add workflow tests for GitHub Actions (bbe133c) — stslex +- feat: implement changelog generation and automated GitHub releases (d04f49a) — stslex +- fix: correct typos in package names and update assertions (8c91802) — stslex +- integrate Firebase Analytics and Crashlytics, update Proguard rules, and refactor deployment workflows (215eab8) — stslex +- feat: integrate Firebase Analytics and Crashlytics and refactor application setup (1d0d31d) — stslex +- feat: implement search and filter functionality in home screen and add corresponding tests (6d19fb1) — stslex +- feat: enhance Home screen with charts and date picker functionality (774c6fc) — stslex +- feat: implement Home screen with tabs and charts functionality (8cbb5c9) — stslex +- test: add query tests for ExerciseDao and ExerciseRepository (f37af66) — stslex +- feat: add search functionality for exercises with query support (ad9c19e) — stslex +- chore: update version to 1.04 and add version updater workflow (df93774) — stslex +- fix: update JDK version from 17 to 21 in deployment workflows (cd64370) — stslex +- fix: specify type for dao.delete in ExerciseRepositoryImplTest (5a00c6c) — stslex +- add initial release with MVP functionality and setup deployment workflows (c9aad4f) — stslex +- implement selection mode with haptic feedback and update action button icons (4d1fd26) — stslex +- refactor project structure and update application identifiers for dev and store variants (95018bb) — stslex +- update dependency versions for Kotlin, Android Gradle Plugin, and Material components (3192a9f) — stslex +- bump version to 1.02 and update version code to 3 (82d163b) — stslex +- update Privacy Policy to clarify data collection practices and add Russian translation (eb73514) — stslex +- update AndroidManifest and launcher icon for improved back navigation and adaptive icon support (95e97fe) — stslex +- refactor ExerciseDao to improve search queries and add update/delete tests (7b0c2e2) — stslex +- refactor ExercisePropertyTextField to enhance dropdown menu icon animation and visibility (075c243) — stslex +- add common handler for exercise feature and implement menu item selection (b5b627c) — stslex +- add date handling with DateProperty and integrate date picker in exercise feature (fca239d) — stslex +- implement shared transition animations in navigation and update back navigation logic (05c1bca) — stslex +- fix nav issues (c4e54f8) — stslex +- migrate to jepack navigation (8865d14) — stslex +- add hash validator for changes (f1cec95) — stslex +- refactor create/edit note (37570c6) — stslex +- change exercise path, fix scopes for koin (16aac80) — stslex +- fix ci (1233b47) — stslex +- fix pathes for dialog screens (2927132) — stslex +- init dialog navigation (1193e03) — stslex +- replace scaffold (ceffff3) — stslex +- initialize gome screen with home store (6cfc29e) — stslex +- Android SDK 36 requires Java 21 (have Java 17) (1826c1d) — stslex +- db with kotlin uuid (6b78c4d) — stslex +- fix room database UUID generation (fb08ff1) — stslex +- init exercise db (f490119) — stslex +- remove unused cache, fix path for build (6dccbc2) — stslex +- inital setup for nav, arch, ui core setup, ci init (72a5071) — stslex +- Initial commit (b6621be) — stslex \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 809b7ef4..005a186d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,8 +7,8 @@ androidTools = "31.13.0" minSdk = "28" targetSdk = "36" compileSdk = "36" -versionName = "1.05" -versionCode = "6" +versionName = "1.06" +versionCode = "7" ktx = "1.17.0" material = "1.13.0"