From b5e30b528aaf975bb215bb584d52e5aa5dc720ce Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Fri, 24 Oct 2025 12:44:47 -0700 Subject: [PATCH 1/4] update deployment to use central publishing instead of EOL ossrh --- pom.xml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 1f5f6a16..aa3595da 100644 --- a/pom.xml +++ b/pom.xml @@ -127,14 +127,14 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 + org.sonatype.central + central-publishing-maven-plugin + 0.9.0 true - ossrh - https://oss.sonatype.org/ - true + central + true + published @@ -184,16 +184,19 @@ - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - + - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + Central Portal Snapshots + central-portal-snapshots + https://central.sonatype.com/repository/maven-snapshots/ + + false + + + true + - + com.coinbase.core From 5620b0b478341a7db88083b633f2ad7f230231ba Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Fri, 1 Nov 2024 11:07:48 -0700 Subject: [PATCH 2/4] add github workflow for building artifacts --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..1dd060e5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '17' + architecture: x64 + + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Build artifacts + run: mvn clean install From cff75cf90a33b554fd5b702b16928c117b57daa3 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Fri, 24 Oct 2025 13:27:31 -0700 Subject: [PATCH 3/4] add daily model generation workflow --- .github/workflows/daily-model-generation.yml | 81 ++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/daily-model-generation.yml diff --git a/.github/workflows/daily-model-generation.yml b/.github/workflows/daily-model-generation.yml new file mode 100644 index 00000000..1787a34b --- /dev/null +++ b/.github/workflows/daily-model-generation.yml @@ -0,0 +1,81 @@ +name: Daily Model Generation + +on: + schedule: + # Run at 1 AM UTC every day + - cron: '0 1 * * *' + workflow_dispatch: # Allow manual triggering + +permissions: + contents: write + pull-requests: write + +jobs: + generate-models: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '17' + architecture: x64 + + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Generate models from OpenAPI spec + run: mvn -Pgenerate-models + + - name: Check for changes + id: git-check + run: | + git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT + + - name: Create Pull Request + if: steps.git-check.outputs.changes == 'true' + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'chore: update generated models from OpenAPI spec' + branch: automated/model-generation-${{ github.run_number }} + delete-branch: true + title: 'chore: Update generated models from OpenAPI spec' + body: | + ## Automated Model Generation + + This PR contains automatically generated updates to the SDK models based on the latest OpenAPI specification from `https://api.prime.coinbase.com/v1/openapi.yaml`. + + ### What changed? + - Models generated/updated via `mvn -Pgenerate-models` + - Changes reflect updates to the Prime API specification + + ### How to review + 1. Verify that generated files follow SDK conventions + 2. Check that new models have proper Builder patterns and license headers + 3. Ensure enums are properly generated + 4. Run tests to verify compatibility: `mvn clean install` + + ### Generated by + Workflow: `${{ github.workflow }}` + Run: `${{ github.run_id }}` + Triggered: `${{ github.event_name }}` + labels: | + automated + model-generation + assignees: ${{ github.repository_owner }} + + - name: No changes detected + if: steps.git-check.outputs.changes != 'true' + run: echo "No model changes detected. Skipping PR creation." From d432445bd99a61ab2604c65c6275a78a3fb4f501 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Fri, 24 Oct 2025 14:22:03 -0700 Subject: [PATCH 4/4] add push trigger to test workflow --- .github/workflows/daily-model-generation.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/daily-model-generation.yml b/.github/workflows/daily-model-generation.yml index 1787a34b..432a36d8 100644 --- a/.github/workflows/daily-model-generation.yml +++ b/.github/workflows/daily-model-generation.yml @@ -1,6 +1,9 @@ name: Daily Model Generation on: + push: + branches: + - actions schedule: # Run at 1 AM UTC every day - cron: '0 1 * * *'