File tree Expand file tree Collapse file tree 3 files changed +53
-8
lines changed Expand file tree Collapse file tree 3 files changed +53
-8
lines changed Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ release :
5+ # We'll run this workflow when a new GitHub release is created
6+ types : [released]
7+ jobs :
8+ publish :
9+ name : Release build and publish
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check out code
13+ uses : actions/checkout@v2
14+ - name : Set up JDK 1.8
15+ uses : actions/setup-java@v1
16+ with :
17+ java-version : 1.8
18+
19+ # Base64 decodes and pipes the GPG key content into the secret file
20+ - name : Prepare environment
21+ env :
22+ GPG_KEY_CONTENTS : ${{ secrets.GPG_KEY_CONTENTS }}
23+ SIGNING_SECRET_KEY_RING_FILE : ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
24+ run : |
25+ git fetch --unshallow
26+ sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
27+
28+ # Builds the release artifacts of the library
29+ - name : Release build
30+ run : ./gradlew :CodeEditText:assembleRelease
31+
32+ # Generates other artifacts (javadocJar is optional)
33+ - name : Source jar and dokka
34+ run : ./gradlew :CodeEditText:androidSourcesJar :CodeEditText:javadocJar
35+
36+ # Runs upload, and then closes & releases the repository
37+ - name : Publish to MavenCentral
38+ run : ./gradlew :CodeEditText:publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
39+ env :
40+ OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
41+ OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
42+ SIGNING_KEY_ID : ${{ secrets.SIGNING_KEY_ID }}
43+ SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
44+ SIGNING_SECRET_KEY_RING_FILE : ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
45+ SONATYPE_STAGING_PROFILE_ID : ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
Original file line number Diff line number Diff line change @@ -30,6 +30,6 @@ android {
3030dependencies {
3131 implementation fileTree(include : [' *.jar' ], dir : ' libs' )
3232 implementation " com.android.support:appcompat-v7:$SLVersion "
33- // implementation 'com .github.lwjfork:CodeEditText:1.0.4 '
34- implementation project( ' :CodeEditText ' )
33+ implementation ' io .github.lwjfork:CodeEditText:1.0.5 '
34+
3535}
Original file line number Diff line number Diff line change 11apply plugin : ' io.github.gradle-nexus.publish-plugin'
22
3- ext[" signing.keyId" ] = SIGNING_KEY_ID
4- ext[" signing.password" ] = SIGNING_PASSWORD
5- ext[" signing.secretKeyRingFile" ] = SIGNING_SECRET_KEY_RING_FILE
6- ext[" ossrhUsername" ] = OSSRH_USERNAME
7- ext[" ossrhPassword" ] = OSSRH_PASSWORD
3+ ext[" signing.keyId" ] = System . getenv( " SIGNING_KEY_ID" )
4+ ext[" signing.password" ] = System . getenv( " SIGNING_PASSWORD" )
5+ ext[" signing.secretKeyRingFile" ] = System . getenv( " SIGNING_SECRET_KEY_RING_FILE" )
6+ ext[" ossrhUsername" ] = System . getenv( " OSSRH_USERNAME" )
7+ ext[" ossrhPassword" ] = System . getenv( " OSSRH_PASSWORD" )
88
99
1010nexusPublishing {
1111 repositories {
1212 sonatype { // only for users registered in Sonatype after 24 Feb 2021
1313 nexusUrl. set(uri(" https://s01.oss.sonatype.org/service/local/" ))
1414 snapshotRepositoryUrl. set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
15- stagingProfileId = STAGING_PRO_FILE_ID
15+ stagingProfileId = System . getenv( " SONATYPE_STAGING_PROFILE_ID " )
1616 username = ossrhUsername
1717 password = ossrhPassword
1818 }
You can’t perform that action at this time.
0 commit comments