update release process (#3439)

This commit is contained in:
Konrad Pozniak 2023-03-18 09:51:21 +01:00 committed by GitHub
parent c36b243745
commit 66eadabd44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 152 additions and 10 deletions

View file

@ -7,20 +7,21 @@ This approach of having ~500 user on the nightly releases and ~5000 users on the
## Beta
- Make sure all new features are well tested by Nightly users and all issues addressed as good as possible. Check GitHub issues, Google Play crash reports, messages on `@Tusky@mastodon.social`, emails on `tusky@connyduck.at`, #Tusky hashtag.
- Merge the latest Weblate translations (Weblate -> Repository maintenance -> commit all changes, then merge the automatic PRs by @nailyk-weblate on GitHub)
- Merge the latest Weblate translations (Weblate -> Repository maintenance -> commit all changes, then merge the automatic PRs by @nailyk-weblate on GitHub)
- Check all the translations (Android Studio shows warnings on problems). Sometimes translators add faulty translations that would crash Tusky in this language, e.g. wrong number of formatting parameters. In this case it is usually easiest to just delete the string. [Example cleanup](https://github.com/tuskyapp/Tusky/commit/feaea70af418c77178985144a2d01a8e97725dfd).
- Update `versionCode` and `versionName` in `app/build.gradle`
- Add a new short changelog under `fastlane/metadata/android/en-US/changelogs`. Use the next versionCode as the filename. This is so translators on Weblate have the duration of the beta to translate the changelog and F-Droid users will see it in their language on the release. If another beta is released, the changelogs have to be renamed. Note that changelogs shouldn't be over 500 characters or F-Droid will truncate them.
- Build the app as apk and as app bundle.
- Do a quick check to make sure the build doesn't crash. Also install it over the last release to make sure the database migrations are correct.
- Merge `develop` into `main`
- Create a new [GitHub release](https://github.com/tuskyapp/Tusky/releases).
- Tag the head of `main`.
- Create an exhaustive changelog by going through all commits since the last release.
- Attach the apk, adb and mapping.txt files to the release
- Mark the release as being a pre-release.
- Bitrise will automatically build and upload the release to the Internal Testing track on Google Play.
- Do a quick check to make sure the build doesn't crash, e.g. by enrolling yourself into the test track.
- In case there are any problems, delete the GitHub release, fix the problems and start again
- Download the build as apk from Google Play (App Bundle Explorer -> chose the release -> Downloads -> Signed, universal APK). Attach it to the GitHub Release.
- Create a new Open Testing release on Google Play. Reuse the build from the Internal Testing track.
- Create a merge request at F-Droid. [Example](https://gitlab.com/fdroid/fdroiddata/-/merge_requests/11218) (F-Droid automatically picks up new release tags, but not beta ones. This could probably be changed somehow.)
- Upload the release to the Open Testing track on Google Play.
- Announce the release
## Full release
@ -28,15 +29,16 @@ This approach of having ~500 user on the nightly releases and ~5000 users on the
- Make sure all new features are well tested by beta users and all issues addressed as good as possible. Check GitHub issues, Google Play crash reports, messages on `@Tusky@mastodon.social`, #Tusky hashtag.
- Merge the latest Weblate translations (Weblate -> Repository maintenance -> commit all changes, then merge the automatic PRs by @nailyk-weblate on GitHub)
- Update `versionCode` and `versionName` in `app/build.gradle`
- Build the app as apk and as app bundle.
- Do a quick check to make sure the build doesn't crash. Also install it over the last release to make sure the database migrations are correct.
- Merge `develop` into `main`
- Create a new [GitHub release](https://github.com/tuskyapp/Tusky/releases).
- Tag the head of `main`.
- Resuse the changelog from the beta release, or create a new one if this is only a minor release.
- Attach the apk, adb and mapping.txt files to the release
- Reuse the changelog from the beta release, or create a new one if this is only a minor release.
- (F-Droid will automatically detect and build the release)
- Upload the release to the Production track on Google Play.
- Bitrise will automatically build and upload the release to the Internal Testing track on Google Play.
- Do a quick check to make sure the build doesn't crash, e.g. by enrolling yourself into the test track.
- In case there are any problems, delete the GitHub release, fix the problems and start again
- Download the build as apk from Google Play (App Bundle Explorer -> chose the release -> Downloads -> Signed, universal APK). Attach it to the GitHub Release.
- Create a new full release on Google Play. Reuse the build from the Internal Testing track.
- update the download link on the homepage ([repo](https://github.com/tuskyapp/tuskyapp.github.io))
- Announce the release

140
bitrise.yml Normal file
View file

@ -0,0 +1,140 @@
format_version: "6"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: android
trigger_map:
- push_branch: develop
workflow: nightly
- pull_request_source_branch: '*'
workflow: primary
- tag: '*'
workflow: release
workflows:
nightly:
steps:
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8.0: {}
- cache-pull@2.7: {}
- install-missing-android-tools:
inputs:
- gradlew_path: $PROJECT_LOCATION/gradlew
- change-android-versioncode-and-versionname@1.3: {}
- gradle-runner@2:
inputs:
- apk_file_include_filter: '*.aab'
- gradlew_path: ./gradlew
- gradle_options: ""
- gradle_task: ktlintCheck testGreenReleaseUnitTest bundleGreenRelease
- sign-apk@1:
inputs:
- apk_path: $BITRISE_AAB_PATH
- script:
inputs:
- content: |
#!/usr/bin/env bash
# write the git log to a file for the deploy step to pick up
git log -3 --pretty=%B | head -c 500 > whatsnew-en-US
- google-play-deploy@3.7:
inputs:
- apk_path: $BITRISE_SIGNED_APK_PATH
- package_name: com.keylesspalace.tusky.test
- track: production
- app_path: $BITRISE_SIGNED_AAB_PATH
- whatsnews_dir: ./
- service_account_json_key_path: $TUSKY_SERVICE_ACC_URL
- deploy-to-bitrise-io@2.1: {}
- cache-push@2.7: {}
primary:
steps:
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}
- cache-pull@2.7: {}
- install-missing-android-tools:
inputs:
- gradlew_path: $PROJECT_LOCATION/gradlew
- gradle-runner@2:
inputs:
- app_file_include_filter: |-
*.apk
*.aab
- app_file_exclude_filter: |2+
- test_apk_file_include_filter: ""
- mapping_file_include_filter: ""
- retry_on_failure: "no"
- gradlew_path: ./gradlew
- gradle_options: --no-daemon
- gradle_task: ktlintCheck
- android-unit-test@1.0:
inputs:
- project_location: $PROJECT_LOCATION
- module: app
- variant: greenDebug
- android-build:
inputs:
- variant: greenDebug
- module: app
- deploy-to-bitrise-io@2.1:
inputs:
- debug_mode: "true"
- notify_user_groups: none
- cache-push@2.7: {}
release:
steps:
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}
- cache-pull@2.7: {}
- install-missing-android-tools@3.1:
inputs:
- gradlew_path: $PROJECT_LOCATION/gradlew
- gradle-runner@2.0:
inputs:
- apk_file_include_filter: ""
- gradlew_path: ./gradlew
- gradle_task: assembleBlueRelease bundleBlueRelease
- sign-apk:
inputs:
- debuggable_permitted: "false"
- keystore_alias: $TUSKY_RELEASE_KEY_NAME
- private_key_password: $TUSKY_RELEASE_KEY_PASSWORD
- verbose_log: "true"
- android_app: $BITRISE_APK_PATH|$BITRISE_AAB_PATH
- apk_path: ""
- deploy-to-bitrise-io@2.1:
inputs:
- generate_universal_apk_if_none: "false"
- script@1:
inputs:
- content: |
#!/usr/bin/env bash
# find the newest english changelog, write it to a file for the deploy step to pick up
changelog_file=$(ls -1 fastlane/metadata/android/en-US/changelogs | sort -V -r | head -n 1)
cat fastlane/metadata/android/en-US/changelogs/$changelog_file >> whatsnew-en-US
- google-play-deploy@3:
inputs:
- app_path: $BITRISE_AAB_PATH
- track: internal
- service_account_json_key_path: $TUSKY_SERVICE_ACC_URL
- package_name: com.keylesspalace.tusky
- cache-push@2.7: {}
app:
envs:
- opts:
is_expand: false
PROJECT_LOCATION: .
- opts:
is_expand: false
MODULE: app
- opts:
is_expand: false
BUILD_VARIANT: GreenDebug
- opts:
is_expand: false
TEST_VARIANT: GreenDebug
meta:
bitrise.io:
stack: linux-docker-android-20.04