Conversation
There was a problem hiding this comment.
Pull request overview
Updates CI/CD to trigger Android Maven Central publishing on version tag pushes and aligns Android library namespaces with the intended io.github.algorandecosystem.* package naming.
Changes:
- Trigger
.github/workflows/ci_cd.ymlonv*tag pushes and pass areleaseflag to the Android reusable workflow for tag-based releases. - Extend
.github/workflows/android_ci.ymlwith a Maven Central publish step and a newreleaseinput. - Update Android module
namespacevalues fromcom.example.*toio.github.algorandecosystem.*.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/android/algokit_transact/build.gradle.kts | Updates Android namespace to the intended publishable package domain. |
| packages/android/algokit_crypto/build.gradle.kts | Updates Android namespace to the intended publishable package domain. |
| packages/android/algokit_algo25/build.gradle.kts | Updates Android namespace to the intended publishable package domain. |
| .github/workflows/ci_cd.yml | Adds tag triggers and wires release signal for Android releases on tags. |
| .github/workflows/android_ci.yml | Adds release input and attempts to publish artifacts to Maven Central. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Build and Publish to Maven Central | ||
| working-directory: ${{ env.ANDROID_PACKAGE_DIR }} | ||
| env: | ||
| GITHUB_TAG: ${{ github.ref_name }} | ||
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.RSA_GPG_PRIVATE_KEY }} | ||
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.RSA_GPG_PASSPHRASE }} | ||
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.CENTRAL_USERNAME }} | ||
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.CENTRAL_PASSWORD }} | ||
| run: | | ||
| export VERSION_TAG=${GITHUB_TAG#v} # Remove the leading 'v' | ||
| echo "Publishing version: $VERSION_TAG" | ||
| echo "Publishing to Maven Central (USER_MANAGED - requires manual release)..." | ||
| ./gradlew publishToMavenCentral |
There was a problem hiding this comment.
The Maven publish step runs unconditionally, so it will execute on pull_request and on normal pushes to main as well (where github.ref_name is main). That will both fail due to missing secrets on PRs and attempt to publish an invalid version derived from a non-tag ref. Gate this step with if: inputs.release (and ideally also github.ref_type == 'tag') and only derive the version from the tag when publishing.
| release: | ||
| description: "Whether to build a release version" | ||
| required: true | ||
| type: boolean |
There was a problem hiding this comment.
release is a required input but is not used anywhere in the job (the build, artifact path, and publish behavior are currently identical regardless of its value). Either make it optional with a default (e.g., false) and use it to control release-only steps, or remove the input to avoid misleading callers.
| push: # A push indicates that a PR is merged and CD should be triggered | ||
| branches: | ||
| - main | ||
| tags: | ||
| - 'v*' |
There was a problem hiding this comment.
Adding a push.tags trigger means this workflow now runs on tag pushes as well as branch pushes. Because other jobs in this workflow treat any push as a release signal (e.g., swift_ci uses release: ${{ github.event_name == 'push' }}), tagging will unintentionally enable those release behaviors too. If the intent is to release only Android on tag pushes, tighten those release: conditions to exclude tags (or split tag-triggered release into a separate workflow).
| plugins { | ||
| alias(libs.plugins.android.library) | ||
| alias(libs.plugins.kotlin.android) | ||
| alias(libs.plugins.android.library) | ||
| alias(libs.plugins.kotlin.android) | ||
| } |
There was a problem hiding this comment.
The CI workflow now expects these Android modules to be publishable to Maven Central, but this Gradle build file still only applies the Android/Kotlin plugins and doesn't define Maven publishing/signing configuration or a version. Unless publishing is configured elsewhere, publishToMavenCentral will not exist and the release workflow will fail; add the necessary publishing plugin/configuration here (or in a shared convention plugin) to match the CI expectations.
|
@joe-p you need some sort of also are we merging algo25 into crypto package or keeping it separate? |
For now releases will be triggered manually. Any time a new tag is push there will be a maven release
Based on https://github.com/michaeltchuangllc/algokit-walletsdk-kmp/blob/main/.github/workflows/publish-sdk-maven.yml