diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 22490eb..2bab214 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -2,7 +2,8 @@ name: Android CI on: push: - branches: [ main ] + tags: + - '**' jobs: build: @@ -17,23 +18,11 @@ jobs: with: java-version: '11' distribution: 'adopt' - - name: Configure GPG Key - run: | - mkdir -p ~/.gnupg/ - printf "$GPG_SECRET_KEY" | base64 --decode > ~/.gnupg/private.key - gpg --batch --import ~/.gnupg/private.key - env: - GPG_SECRET_KEY: ${{ secrets.GPG_KEY }} - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build - name: Publish Artifacts run: ./gradlew composed-barcodes:publishReleasePublicationToSonatypeRepository env: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} - SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} - SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} + GPG_KEY: ${{ secrets.GPG_KEY }} + SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 7b5cb84..028e707 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,6 +5,7 @@ + diff --git a/composed-barcodes/build.gradle b/composed-barcodes/build.gradle index 66f3169..e5465b5 100644 --- a/composed-barcodes/build.gradle +++ b/composed-barcodes/build.gradle @@ -6,7 +6,7 @@ plugins { ext { // Provide your own coordinates here PUBLISH_GROUP_ID = 'com.simonsickle' - PUBLISH_VERSION = '0.9.0' + PUBLISH_VERSION = '0.9.1' PUBLISH_ARTIFACT_ID = 'composed-barcodes' } diff --git a/scripts/publish-module.gradle b/scripts/publish-module.gradle index a58665f..efb27b1 100644 --- a/scripts/publish-module.gradle +++ b/scripts/publish-module.gradle @@ -73,10 +73,10 @@ afterEvaluate { } } -ext["signing.keyId"] = rootProject.ext["signing.keyId"] -ext["signing.password"] = rootProject.ext["signing.password"] -//ext["signing.secretKeyRingFile"] = rootProject.ext["signing.secretKeyRingFile"] - signing { + def signingKey = rootProject.ext["signing.key"] + def signingPassword = rootProject.ext["signing.password"] + useGpgCmd() + useInMemoryPgpKeys(signingKey, signingPassword) sign publishing.publications } \ No newline at end of file diff --git a/scripts/publish-root.gradle b/scripts/publish-root.gradle index 1fa8a99..4fd0111 100644 --- a/scripts/publish-root.gradle +++ b/scripts/publish-root.gradle @@ -2,9 +2,8 @@ ext["ossrhUsername"] = '' ext["ossrhPassword"] = '' ext["sonatypeStagingProfileId"] = '' -ext["signing.keyId"] = '' +ext["signing.key"] = '' ext["signing.password"] = '' -ext["signing.secretKeyRingFile"] = '' File secretPropsFile = project.rootProject.file('local.properties') if (secretPropsFile.exists()) { @@ -17,9 +16,8 @@ if (secretPropsFile.exists()) { ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') - ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') + ext["signing.key"] = System.getenv('GPG_KEY') ext["signing.password"] = System.getenv('SIGNING_PASSWORD') - ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE') } // Set up Sonatype repository