Skip to content

Commit

Permalink
add signing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivchar Vitaly committed Jul 19, 2024
1 parent b351f5c commit d5fb700
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on:
branches:
- master
env:
TOKEN: ${{ secrets.MVNTOKEN }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
SECRET_PASSPHRASE: ${{ secrets.SECRET_PASSPHRASE }}
SIGNING_KEYID: ${{ secrets.SIGNING_KEYID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_CONTENT: ${{ secrets.SIGNING_SECRET_KEY_RING_CONTENT }}

jobs:
build:
Expand All @@ -21,8 +25,13 @@ jobs:
distribution: 'adopt'
java-version: '17'

- name: Prepare environment
run: |
echo '$SIGNING_SECRET_KEY_RING_CONTENT' | base64 -d > publish_key.gpg
gpg --quiet --batch --yes --decrypt --passphrase="$SECRET_PASSPHRASE" --output secret.gpg publish_key.gpg
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew publish -Ptoken="$TOKEN"
- name: Publish with gradle
run: ./gradlew publish -Psigning.secretKeyRingFile=secret.gpg -Psigning.keyId=$SIGNING_KEYID -Psigning.password=$SIGNING_PASSWORD -Ptoken="$TOKEN"
5 changes: 5 additions & 0 deletions rendererrecyclerviewadapter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.android.kotlin)
id("maven-publish")
id("signing")
}

android {
Expand Down Expand Up @@ -34,6 +35,10 @@ dependencies {
implementation(libs.androidx.recyclerview)
}

signing {
sign(publishing.publications["release"])
}

/**
* https://issues.sonatype.org/browse/OSSRH-54875
* https://issues.sonatype.org/browse/OSSRH-67154
Expand Down

0 comments on commit d5fb700

Please sign in to comment.