From 376dc0e1ab6bd20b65b997d43f333018e5585d56 Mon Sep 17 00:00:00 2001 From: Felipe Lima Date: Thu, 20 Jun 2024 11:47:39 -0700 Subject: [PATCH] fix: Publish build artifacts with release (#70) * fix: Publish build artifacts with release * assemble before publish --- .github/workflows/publish-sdk.yaml | 2 +- .github/workflows/publish-snapshot.yml | 2 +- eppo/build.gradle | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-sdk.yaml b/.github/workflows/publish-sdk.yaml index a8513342..9b0bad6d 100644 --- a/.github/workflows/publish-sdk.yaml +++ b/.github/workflows/publish-sdk.yaml @@ -34,7 +34,7 @@ jobs: echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV - name: Publish Release artifact - run: ./gradlew publish -Prelease --no-daemon + run: ./gradlew eppo:assemble eppo:publish -Prelease --no-daemon env: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 8b4fbcb9..a4529b4b 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -26,7 +26,7 @@ jobs: gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} - name: Publish Snapshot artifact - run: ./gradlew publish -Psnapshot --no-daemon + run: ./gradlew eppo:assemble eppo:publish -Psnapshot --no-daemon env: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/eppo/build.gradle b/eppo/build.gradle index 1953496d..29ace8d6 100644 --- a/eppo/build.gradle +++ b/eppo/build.gradle @@ -49,6 +49,13 @@ android { excludes += "META-INF/**" } } + + publishing { + singleVariant('release') { + withSourcesJar() + withJavadocJar() + } + } } ext {} @@ -111,7 +118,7 @@ publishing { version = project.properties.get("version") afterEvaluate { - from components.findByName('release') + from components.release } pom {