diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f18ba6..8383a4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ permissions: contents: read jobs: - publish-snapshots: + build-and-publish-snapshots: runs-on: ubuntu-latest # skipping release branches because the versions in those branches are not snapshots if: github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-proto-java' @@ -26,8 +26,11 @@ jobs: - name: Set up gradle uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 - - name: Build and publish snapshots - run: ./gradlew assemble publishToSonatype + - name: Build + run: ./gradlew build + + - name: Publish snapshots + run: ./gradlew publishToSonatype env: SONATYPE_USER: ${{ secrets.SONATYPE_USER }} SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69401d6..7ae875a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,6 +28,9 @@ jobs: - uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 + - name: Build + run: ./gradlew build + - name: Build and publish artifacts run: ./gradlew assemble publishToSonatype closeAndReleaseSonatypeStagingRepository env: