Skip to content

Commit

Permalink
Update publish tasks to be able to deploy by Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
moallemi authored Mar 23, 2020
1 parent 7ec7bba commit e0f666f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'releases/**'

jobs:
build:
deploy:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -39,7 +39,20 @@ jobs:
run: ./gradlew test

- name: Deploy to maven
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publish

- name: Deploy to bintray
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
BINTRAY_SIGNING_PASSWORD: ${{ secrets.BINTRAY_SIGNING_PASSWORD }}
run: ./gradlew bintrayUpload
9 changes: 4 additions & 5 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

project.description = "Implementing rangeTo operator for LocalDate and Date in kotlin"
project.group = "me.moallemi.tools"
project.version = "0.0.3"
project.version = "0.0.4"
project.ext {
artifactId = 'kotlin-date-range'
name = 'Kotlin Date Range'
Expand Down Expand Up @@ -71,12 +71,9 @@ publishing {
}
}

ext."signing.keyId" = System.getenv('SIGNING_KEYID')
ext."signing.password" = System.getenv('SIGNING_PASSWORD')
ext."signing.secretKeyRingFile" = System.getenv('SIGNING_SECRET_KEYRING_FILE')

signing {
required !version.endsWith('SNAPSHOT')
useInMemoryPgpKeys(System.getenv('SIGNING_KEY'), System.getenv('SIGNING_PASSWORD'))
sign(publishing.publications["kotlinDateRange"])
}

Expand All @@ -95,6 +92,8 @@ bintray {
licenses = ['Apache-2.0']
labels = ['kotlin', 'android', 'date', 'local-date', 'date-range']
publicDownloadNumbers = false
githubRepo = 'moallemi/kotlin-date-range' //Optional Github repository
githubReleaseNotesFile = 'README.md' //Optional Github readme file
version {
name = project.version
//desc = 'optional, version-specific description'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Sun Mar 22 12:54:09 CET 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down

0 comments on commit e0f666f

Please sign in to comment.