diff --git a/.github/workflows/sonatype-test.yml b/.github/workflows/sonatype-test.yml new file mode 100644 index 00000000..4adc4cc1 --- /dev/null +++ b/.github/workflows/sonatype-test.yml @@ -0,0 +1,48 @@ +on: + push: + branches: + - migrate-sonatype-test + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache Gradle Modules + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: gradle-caches-${{ hashFiles('**/*.gradle.kts') }} + - name: Cache Gradle Wrapper + uses: actions/cache@v4 + with: + path: ~/.gradle/wrapper + key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + - name: Build and test + run: ./gradlew build -Prelease.version=0.0.1-sonatype-test --stacktrace + env: + CI: true + - name: Build and publish to sonatype + run: ./gradlew final closeAndReleaseSonatypeStagingRepository -Prelease.version=0.0.1-sonatype-test --stacktrace + env: + CI: true + SONATYPE_USERNAME_TEST: ${{ secrets.SONATYPE_USERNAME_TEST }} + SONATYPE_PASSWORD_TEST: ${{ secrets.SONATYPE_PASSWORD_TEST }} + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} + GRGIT_USER: ${{ github.actor }} + GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }} + # - name: Create Release + # id: create_release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # tag_name: v${{ github.event.inputs.version }} + # release_name: Release v${{ github.event.inputs.version }} + # draft: true + # prerelease: false diff --git a/.gitignore b/.gitignore index aeb27406..ea4264b3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ .project .classpath .DS_Store +.vscode *.iml /.idea diff --git a/README.md b/README.md index 57d75d39..7b26ec7a 100644 --- a/README.md +++ b/README.md @@ -20,67 +20,67 @@ Add the AWS X-Ray SDK dependencies to your pom.xml: com.amazonaws aws-xray-recorder-sdk-core - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-apache-http - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-aws-sdk - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-aws-sdk-v2 - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-aws-sdk-instrumentor - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-aws-sdk-v2-instrumentor - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-sql - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-sql-mysql - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-sql-postgres - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-spring - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-log4j - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-slf4j - 2.18.2 + 0.0.1-test com.amazonaws aws-xray-recorder-sdk-metrics - 2.18.2 + 0.0.1-test ``` diff --git a/build.gradle.kts b/build.gradle.kts index d7110e07..2434c807 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -40,19 +40,23 @@ release { defaultVersionStrategy = Strategies.getSNAPSHOT() } +nebulaRelease { + addReleaseBranchPattern("migrate-sonatype-test") +} + nexusPublishing { repositories { sonatype { - nexusUrl.set(uri("https://aws.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://aws.oss.sonatype.org/content/repositories/snapshots/")) - username.set("${findProperty("aws.sonatype.username") ?: System.getenv("SONATYPE_USERNAME")}") - password.set("${findProperty("aws.sonatype.password") ?: System.getenv("SONATYPE_PASSWORD")}") + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) + username.set("${findProperty("aws.sonatype.username") ?: System.getenv("SONATYPE_USERNAME_TEST")}") + password.set("${findProperty("aws.sonatype.password") ?: System.getenv("SONATYPE_PASSWORD_TEST")}") } } } allprojects { - group = "com.amazonaws" + group = "com.sonatype.central.testing.amazon" repositories { mavenCentral() @@ -301,7 +305,7 @@ allprojects { } subprojects { - group = "com.amazonaws" + group = "com.sonatype.central.testing.amazon" plugins.withId("java-library") { plugins.apply("jacoco")