← 返回首页
chore: Optimize GitHub Actions and release workflows by lahirumaramba · Pull Request #1207 · firebase/firebase-admin-java · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

chore: Optimize GitHub Actions and release workflows#1207

Open
lahirumaramba wants to merge 3 commits into
mainfrom
lm-optimize-releases
Open

chore: Optimize GitHub Actions and release workflows#1207
lahirumaramba wants to merge 3 commits into
mainfrom
lm-optimize-releases

Conversation

lahirumaramba commented May 15, 2026
edited
Loading

Copy link
Copy Markdown
Member
  • Bumped actions/checkout and actions/setup-java across release.yml, ci.yml, and nightly.yml. This resolves Node.js 20 deprecation warnings and ensures compatibility with Node.js 24+ runners.
  • Added cache: 'maven' to actions/setup-java across all workflows. This caches precisely ~/.m2/repository, eliminating repetitive 100MB+ downloads from Maven Central and speeding up matrix CI builds.
  • Configured fetch-depth: 0 and fetch-tags: true on the publish checkout step in release.yml, removing the need for redundant secondary git fetch commands in publish_preflight_check.sh.
  • Removed the deprecated <gpg.passphrase> property from settings.xml and updated release.yml to pass MAVEN_GPG_PASSPHRASE securely in the runner environment.
  • Replaced -DskipTests with -Dmaven.test.skip=true in publish_artifacts.sh to completely bypass test compilation and dependency resolution during release artifact deployment.
  • Replaced the heavy mvn help:evaluate command in publish_preflight_check.sh with a lightweight Python XML parser, making extraction resilient to XML structure changes while reducing execution time from ~12 seconds to milliseconds.

lahirumaramba added the release:stage Stage a release candidate label May 15, 2026

gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Code Review

This pull request updates the CI/CD workflow by removing the GPG passphrase from the Maven settings, switching to -Dmaven.test.skip=true, and replacing the Maven-based version extraction with a shell command. It also removes several git fetch operations. Reviewers identified that removing the passphrase from settings without passing it as a property to the Maven command will break artifact signing. Additionally, the new grep/sed method for version extraction is considered fragile, and a more robust Python-based XML parsing approach is suggested.

mvn -B clean deploy \
-Dcheckstyle.skip \
-DskipTests \
-Dmaven.test.skip=true \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

The GPG passphrase was removed from settings.xml, but it is not being passed to the mvn deploy command. The maven-gpg-plugin requires the gpg.passphrase property to sign artifacts in batch mode. Even if MAVEN_GPG_PASSPHRASE is defined in the environment (as noted in the PR description), Maven will not automatically use it. You should explicitly pass it as a property.

Suggested change
-Dmaven.test.skip=true \
-Dmaven.test.skip=true \
-Dgpg.passphrase="${MAVEN_GPG_PASSPHRASE}" \

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

@gemini-code-assist This project uses maven-gpg-plugin version 3.2.8. In version 3.x, the plugin natively detects and reads the MAVEN_GPG_PASSPHRASE environment variable during batch execution.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Thank you for the clarification. You are correct that maven-gpg-plugin 3.x and later versions automatically detect the MAVEN_GPG_PASSPHRASE environment variable when running in batch mode. My previous concern regarding the explicit property passing is therefore resolved by your project's use of a modern plugin version.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Is it possible to set the Key ID this way as well?

Comment thread .github/scripts/publish_preflight_check.sh Outdated Show resolved Hide resolved

jonathanedey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

LGTM with one comment. Thanks!

mvn -B clean deploy \
-Dcheckstyle.skip \
-DskipTests \
-Dmaven.test.skip=true \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Is it possible to set the Key ID this way as well?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:stage Stage a release candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Footer

© 2026 GitHub, Inc.