diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index 8e545881..3f540af1 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -16,8 +16,11 @@ jobs: with: java-version: 1.8 - - name: Publish SNAPSHOT to the Maven Central Repository - run: ./gradlew clean afterpay:uploadArchives --no-daemon --no-parallel + - name: Clean repository before building SDK + run: ./gradlew clean + + - name: Build and upload archives to the Maven Central Repository + run: ./gradlew afterpay:uploadArchives --no-daemon --no-parallel env: SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad115d2e..c000435b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,8 +19,11 @@ jobs: - name: Remove SNAPSHOT from version run: sed -i 's/-SNAPSHOT//g' gradle.properties - - name: Upload archives to the Maven Central Repository - run: ./gradlew clean afterpay:uploadArchives --no-daemon --no-parallel + - name: Clean repository before building SDK + run: ./gradlew clean + + - name: Build and upload archives to the Maven Central Repository + run: ./gradlew afterpay:uploadArchives --no-daemon --no-parallel env: SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}