Skip to content

Commit

Permalink
test 15
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpitre committed Nov 7, 2024
1 parent 96d408e commit 1e5aff5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/publish_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@ jobs:
- id: get_version
uses: battila7/get-version-action@v2

- name: printVersion
run: echo "The version is ${{ steps.get_version.outputs.version }}"

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'

- name: Generate CLI jar
if: github.event_name == 'release'
# if: github.event_name == 'release'
run: ./gradlew shadowJar

- name: Upload JAR Asset
if: github.event_name == 'release'
# if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -52,11 +55,11 @@ jobs:
asset_content_type: application/json

- name: Generate JavaDocs
if: github.event_name == 'release'
# if: github.event_name == 'release'
run: ./gradlew aggregateJavadoc

- name: Zip JavaDocs
if: github.event_name == 'release'
# if: github.event_name == 'release'
run: zip -r javadocs.zip build/docs/aggregateJavadoc

- name: Upload zipped Javadocs
Expand Down
13 changes: 9 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* A note about publishing and signing.
* Maven central requires that artifacts be signed. And upload is done to Sonatype.
* To publish you will need these environment variables defined:
* SONATYPE_USERNAME
* SONATYPE_PASSWORD
* SONATYPE_TOKEN_USERNAME
* SONATYPE_TOKEN_PASSWORD
* MAVEN_GPG_PRIVATE_KEY
* MAVEN_GPG_PASSPHRASE
* Suggestion is to put these in a shell script with restricted read permissions, then source it before calling
Expand Down Expand Up @@ -109,6 +109,9 @@ subprojects {
def fullProjectName = 'gtfs-validator-' + project.name

afterEvaluate {
println "SONATYPE_TOKEN_USERNAME = " + System.getenv('SONATYPE_TOKEN_USERNAME')
println "SONATYPE_TOKEN_PASSWORD = " + System.getenv('SONATYPE_TOKEN_PASSWORD')

publishing {
repositories {
// This is the sonatype staging repo for maven.
Expand All @@ -119,8 +122,8 @@ subprojects {
maven {
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2'
credentials {
username System.getenv("SONATYPE_USERNAME")
password System.getenv("SONATYPE_PASSWORD")
username System.getenv("SONATYPE_TOKEN_USERNAME")
password System.getenv("SONATYPE_TOKEN_PASSWORD")
}
}
}
Expand Down Expand Up @@ -161,6 +164,8 @@ subprojects {
}
}
signing {
println "MAVEN_GPG_PRIVATE_KEY = " + System.getenv('MAVEN_GPG_PRIVATE_KEY')
println "MAVEN_GPG_PASSPHRASE = " + System.getenv('MAVEN_GPG_PASSPHRASE')
useInMemoryPgpKeys(System.getenv('MAVEN_GPG_PRIVATE_KEY'), System.getenv('MAVEN_GPG_PASSPHRASE'))
sign publishing.publications.mavenJava
}
Expand Down

0 comments on commit 1e5aff5

Please sign in to comment.