Skip to content

Improve release automation - #407

Open
mahibi wants to merge 11 commits into
mainfrom
improveReleaseAutomation
Open

mahibi wants to merge 11 commits into
mainfrom
improveReleaseAutomation

Conversation

@mahibi

@mahibi mahibi commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Release lanes no longer read secrets from the shell configuration, and releases are safer and easier to follow.

Changes

  • Renamed lanes: releasePhase1 → build, releasePhase2 → release, releasePhase2DryRun → releaseDryRun. The lane descriptions no longer mention phases, whose numbers did not match the numbers of the fastlane lane menu.
  • Secrets are asked for, not read from the environment: keystore passwords, GitHub API token and (final Files releases only) the Huawei AppGallery Connect API client. Each is checked before anything is published. Leftover environment variables are reported.
  • Keystore settings: keystore file and key alias are checked before the passwords are asked for, with a hint on how to set them.
  • incrementVersion: shows a menu of version increments and creates the empty release notes file.
  • commitVersion: new lane that commits the version change and changelog file. It does not push.
  • release pushes the branch: after build has tested and built it, so a failing release leaves no version bump on the shared branch. It stops if the branch has diverged from its upstream branch, asks if the upstream branch has newer commits, and pushes the branch before the tag.
  • releaseDryRun: shows what would be pushed and published, without doing it.
  • More checks before release: release notes present and ≤ 500 characters, artifacts signed and built from HEAD.
  • Git warnings are no longer taken for uncommitted changes (e.g. "untracked cache is disabled").
  • Signing passwords stay out of Gradle caches and daemons.
  • Clear summary and next steps at the end of every lane.
  • New suggest-release-notes Claude Code skill: synced from config/skills/ to .claude/skills/ in the apps; it drafts the release notes from the milestone. Its instructions also serve people writing release notes by hand.

Merge order

  1. this PR
  2. the sync PRs in the apps
  3. the app PRs, which remove the passwords from their Fastfiles:

Then backport to the stable branches used for the next release.

Testing

See the app PRs:

  • copy config/fastlane/common.Fastfile into an app's fastlane/ folder
  • copy config/skills/suggest-release-notes/ into the app's .claude/skills/ folder
  • then run incrementVersion, commitVersion, build and releaseDryRun (none of them pushes or publishes)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

- The keystore passwords and the GitHub API token are asked for instead
  of being read from the environment, and checked before they are used.
  Signed builds keep the passwords out of Gradle caches and processes.
- incrementVersion offers a menu of version increments and creates the
  empty release notes file; commitVersion commits and pushes the version
  change. releasePhase2 checks the release notes, that the branch is
  pushed and that the artifacts were built from HEAD.
- releasePhase2DryRun shows what would be published without publishing.
- The bundle is moved to release/ next to the APKs, and all artifacts
  are checked to be signed.
- Every lane ends with a summary of its result and the next steps.
  printVersionInfo includes the F-Droid version codes in it.

App Fastfiles should remove the password entries from their
*_SIGNING_PROPERTIES; values still set in the environment are reported.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The skill drafts the release notes file that fastlane incrementVersion
creates, from the merged pull requests of the milestone, for Google Play
and the GitHub release. Its guide release-notes.md also serves people
writing release notes by hand. It is synced to .claude/skills/ of the
apps and reads the repository from REPO in fastlane/Fastfile.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Skills in config/skills/ are synced to .claude/skills/ of Files, Talk
and Notes. Skills the apps keep themselves are not touched, as the sync
does not delete files missing in the source.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The Huawei AppGallery Connect API client ID and secret are no longer read
from environment variables set in the shell configuration. releasePhase2
asks for them before anything is published, only when the release is
uploaded to Huawei AppGallery (final releases of Files), and checks them
by requesting an access token. The app ID is taken from HUAWEI_APP_ID in
the app's Fastfile, or asked for.

FASTLANE_*_HUAWEI_* values still set in the environment are reported.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@codacy-production

codacy-production Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 minor

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
BestPractice 1 minor

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

When the environment variable for the keystore file or key alias is not
set, the keystore check reported the repository folder as missing
keystore. It now names the missing setting and points to the comment in
fastlane/Fastfile that lists the environment variables to set.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The keystore file and key alias of the upload keystore and, if defined,
the APK keystore are checked before the first password is asked for, so
a missing setting is reported before the passwords are typed.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi self-assigned this Nov 20, 2026
The guide was a separate file next to SKILL.md, so Claude had to read a
second file after loading the skill. It is now the content of SKILL.md,
which fastlane points to after incrementVersion. Lines are wrapped at 80
characters and code blocks have a language, as Codacy asks for.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
ensure_git_status_clean reads stdout and stderr of git status together,
so a warning like "untracked cache is disabled on this system or
location" stopped releasePhase1 and releasePhase2 although the working
tree was clean. The release lanes now check only the changes git status
lists, and show warnings without failing.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…commitVersion

commitVersion pushed the version change before releasePhase1 had run the
tests and built the release, so a failing release left a version bump on
the shared branch, and testing the lanes changed a real branch.

commitVersion now only commits, and releasePhase1 stays local.
releasePhase2 fetches and checks the branch before anything is
published: it stops if the branch has diverged from its upstream branch,
asks if the upstream branch has newer commits, and shows what it will
push in the confirmation. It pushes the branch before the tag, or with a
new upstream branch if there is none. releasePhase2DryRun shows what
would be pushed.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The license moves from an HTML comment into the frontmatter, the
description becomes a folded block starting with "Use when", and the
frontmatter gets metadata with author and version, as in the skills of
nextcloud/android.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…yRun

I renamed the lanes and descriptions because it gets confusing to
have descriptions like "release phase 2" but it needs a different
number as input, like "4". Happened to me several times that
i entered "2" instead.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi added the 3. to review Waiting for reviews label Nov 20, 2026
@mahibi
mahibi marked this pull request as ready for review November 20, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant