-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the release please action to publish the sdk to sonatype. It closes but does not release the sonatype repository, so we can manually verify the artifact.
- Loading branch information
Showing
2 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
branches: [main] | ||
|
||
jobs: | ||
test: | ||
generate-readme-and-prep-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup repo | ||
|
@@ -21,3 +21,47 @@ jobs: | |
project_type: sdk | ||
sdk_language: Kotlin | ||
dev_docs_slug: kotlin | ||
|
||
- name: Update release branch | ||
uses: google-github-actions/release-please-action@v4 | ||
id: release | ||
with: | ||
token: ${{ secrets.MOMENTO_MACHINE_USER_GITHUB_TOKEN }} | ||
path: src | ||
release-type: java | ||
package-name: client-sdk-kotlin | ||
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]' | ||
extra-files: | | ||
build.gradle.kts | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'corretto' | ||
if: ${{ steps.release.outputs.src--release_created }} | ||
|
||
# The Android SDK is required to build the project, even if we are not running Android tests. | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
if: ${{ steps.release.outputs.src--release_created }} | ||
|
||
- name: Build project | ||
uses: gradle/[email protected] | ||
with: | ||
arguments: clean build -x jvmTest -x testDebugUnitTest -x testReleaseUnitTest | ||
if: ${{ steps.release.outputs.src--release_created }} | ||
|
||
- name: Publish to sonatype | ||
env: | ||
SONATYPE_SIGNING_KEY: ${{ secrets.SONATYPE_SIGNING_KEY }} | ||
SONATYPE_SIGNING_KEY_PASSWORD: ${{ secrets.SONATYPE_SIGNING_KEY_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
ORG_GRADLE_PROJECT_version: ${{ steps.semrel.outputs.version }} | ||
uses: gradle/[email protected] | ||
with: | ||
# TODO: automatically release when release process is verified to work | ||
# arguments: publishToSonatype closeAndReleaseStagingRepository | ||
arguments: publishToSonatype closeSonatypeStagingRepository | ||
if: ${{ steps.release.outputs.src--release_created }} |
This file contains 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