-
Notifications
You must be signed in to change notification settings - Fork 10
ci: trigger maven release for new tags #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,10 @@ on: | |
| description: "Crate name to build Android package from" | ||
| required: true | ||
| type: string | ||
| release: | ||
| description: "Whether to build a release version" | ||
| required: true | ||
| type: boolean | ||
|
|
||
| env: | ||
| CRATE: ${{ inputs.crate }} | ||
|
|
@@ -76,3 +80,17 @@ jobs: | |
| with: | ||
| name: ${{ env.CRATE }}.aar | ||
| path: ${{ env.ANDROID_PACKAGE_DIR }}/build/outputs/aar/${{ env.CRATE }}-release.aar | ||
|
|
||
| - 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 | ||
|
Comment on lines
+84
to
+96
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,8 @@ on: | |
| push: # A push indicates that a PR is merged and CD should be triggered | ||
| branches: | ||
| - main | ||
| tags: | ||
| - 'v*' | ||
|
Comment on lines
4
to
+8
|
||
| pull_request: # For PRs, we run CI, which is the same as CD without the release step(s) | ||
| branches: | ||
| - main | ||
|
|
@@ -96,3 +98,4 @@ jobs: | |
| include: ${{ fromJSON(needs.setup.outputs.ffi_packages) }} | ||
| with: | ||
| crate: ${{ matrix.crate_name }} | ||
| release: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
releaseis 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.