-
Notifications
You must be signed in to change notification settings - Fork 3
ci: adds release please support for launchdarkly-observability-android package #145
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
Merged
Merged
Changes from 21 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
1f6e616
chore: adds skeleton Android observability plugin with barebones metr…
tanderson-ld 6c35890
Merge branch 'main' into ta/O11Y-339/basic-android-obs-client-squash
tanderson-ld f2f4b52
removing local.properties
tanderson-ld ffb1d2b
feat: adds startSpan and evaluation tracing in spans
tanderson-ld c4819d8
wip
tanderson-ld 50ad8ac
Merge remote-tracking branch 'origin' into ta/O11Y-370/android-lifecy…
tanderson-ld 400f00f
wip
tanderson-ld 6fa8a30
self review comments
tanderson-ld b291f67
Merge branch 'main' into ta/O11Y-358/startspan-support-w-crude-lifecy…
tanderson-ld 736f3ed
fixing recordError ignoring attributes
tanderson-ld 87f4359
wip
tanderson-ld 17094c8
wip
tanderson-ld 35fe886
wip
tanderson-ld 38ece63
wip
tanderson-ld fec536e
wip
tanderson-ld 4353893
wip
tanderson-ld b4e99d9
Merge remote-tracking branch 'origin' into ta/O11Y-388/setup-build-pu…
tanderson-ld 6c070b2
final tweaks before testing server side
tanderson-ld c1eff43
self review
tanderson-ld 047082a
removing redundant release please version comment
tanderson-ld ae6ff15
removing unnecessary username/password options for nexus publishing
tanderson-ld 1ac38dd
review comments
tanderson-ld 69c548f
formatting fix
tanderson-ld 7edb4cb
formatting fix
tanderson-ld 5b6e417
Merge branch 'main' into ta/O11Y-388/setup-build-publish-actions
tanderson-ld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: 'Publish Android SDK' | ||
| description: 'Build and publish Android SDK packages to Maven Central' | ||
|
|
||
| inputs: | ||
| workspace-path: | ||
| description: 'Path to the Android SDK workspace' | ||
| required: true | ||
| default: 'sdk/@launchdarkly/observability-android' | ||
| java_version: | ||
| description: 'The Java version to use.' | ||
| required: false | ||
| default: '17' | ||
| java_distribution: | ||
| description: 'The Java distribution to use.' | ||
| required: false | ||
| default: 'temurin' | ||
| aws-role-arn: | ||
| description: 'AWS role ARN for accessing secrets' | ||
| required: true | ||
| dry-run: | ||
| description: 'Whether to run the publish in dry-run mode' | ||
| required: false | ||
| default: 'false' | ||
| prerelease: | ||
| description: 'Whether to publish a prerelease version' | ||
| required: false | ||
| default: 'false' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: ${{ inputs.java_distribution }} | ||
| java-version: ${{ inputs.java_version }} | ||
|
|
||
| - name: Setup Android SDK | ||
| uses: android-actions/setup-android@v3 | ||
|
|
||
| - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.1.0 | ||
cursor[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| name: Get secrets | ||
| with: | ||
| aws_assume_role: ${{ inputs.aws-role-arn }} | ||
| ssm_parameter_pairs: '/production/common/releasing/sonatype/central/username = SONATYPE_USER_NAME, | ||
| /production/common/releasing/sonatype/central/password = SONATYPE_PASSWORD, | ||
| /production/common/releasing/android_code_signing/private_key_id = SIGNING_KEY_ID, | ||
| /production/common/releasing/android_code_signing/private_key_passphrase = SIGNING_KEY_PASSPHRASE' | ||
| s3_path_pairs: 'launchdarkly-releaser/android/code-signing-keyring.gpg = code-signing-keyring.gpg' | ||
|
|
||
| - name: Publish Library | ||
| shell: bash | ||
| if: ${{ inputs.dry-run != 'true' }} | ||
| working-directory: ${{ inputs.workspace-path }} | ||
| env: | ||
| LD_RELEASE_IS_PRERELEASE: ${{ inputs.prerelease }} | ||
| SIGNING_KEY_ID: ${{ env.SIGNING_KEY_ID }} | ||
| SIGNING_KEY_PASSPHRASE: ${{ env.SIGNING_KEY_PASSPHRASE }} | ||
| SIGNING_SECRET_KEY_RING_FILE: ${{ github.workspace }}/code-signing-keyring.gpg | ||
| SONATYPE_USER_NAME: ${{ env.SONATYPE_USER_NAME }} | ||
| SONATYPE_PASSWORD: ${{ env.SONATYPE_PASSWORD }} | ||
| run: source $GITHUB_ACTION_PATH/publish.sh | ||
|
|
||
| - name: Dry Run Publish Library | ||
| shell: bash | ||
| if: ${{ inputs.dry-run == 'true' }} | ||
| run: echo "Dry run. Not publishing." | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -ue | ||
|
|
||
| echo "Publishing to Sonatype" | ||
| if [ "${LD_RELEASE_IS_PRERELEASE}" == "true" ]; then | ||
| echo "PRERELEASE" | ||
| ./gradlew publishToSonatype -Psigning.keyId="${SIGNING_KEY_ID}" -Psigning.password="${SIGNING_KEY_PASSPHRASE}" -Psigning.secretKeyRingFile="${SIGNING_SECRET_KEY_RING_FILE}" -PsonatypeUsername="${SONATYPE_USER_NAME}" -PsonatypePassword="${SONATYPE_PASSWORD}" || { | ||
| echo "Gradle publish/release failed" >&2 | ||
| exit 1 | ||
| } | ||
| else | ||
| echo "RELEASE" | ||
| ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Psigning.keyId="${SIGNING_KEY_ID}" -Psigning.password="${SIGNING_KEY_PASSPHRASE}" -Psigning.secretKeyRingFile="${SIGNING_SECRET_KEY_RING_FILE}" -PsonatypeUsername="${SONATYPE_USER_NAME}" -PsonatypePassword="${SONATYPE_PASSWORD}" || { | ||
| echo "Gradle publish/release failed" >&2 | ||
| exit 1 | ||
| } | ||
| fi |
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
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
2 changes: 1 addition & 1 deletion
2
e2e/android/app/src/main/java/com/example/androidobservability/ViewModel.kt
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| plugins { | ||
| id("io.github.gradle-nexus.publish-plugin").version("2.0.0").apply(true) | ||
| } | ||
|
|
||
| nexusPublishing { | ||
| this.repositories { | ||
| sonatype { | ||
| nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) | ||
| snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) | ||
| } | ||
| } | ||
| } |
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
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
2 changes: 2 additions & 0 deletions
2
...-android/lib/src/main/kotlin/com/launchdarkly/observability/client/ObservabilityClient.kt
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
3 changes: 2 additions & 1 deletion
3
...bility-android/lib/src/main/kotlin/com/launchdarkly/observability/plugin/Observability.kt
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
3 changes: 3 additions & 0 deletions
3
...observability-android/lib/src/main/kotlin/com/launchdarkly/observability/sdk/LDObserve.kt
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.