Skip to content

Commit

Permalink
ci:update publish_maven.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Petterpx committed Oct 12, 2023
1 parent 7958c8c commit a8eadc3
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/publish_maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,30 @@ name: Publish Maven

on:
release:
types: [published]
types: [ published ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- uses: burrunan/gradle-cache-action@v1
name: Cache gradle
- uses: actions/checkout@v2
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- uses: burrunan/gradle-cache-action@v1
name: Cache gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: publish maven
run: ./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache closeAndReleaseRepository
- name: publish maven
env:
MAVEN_USERNAME: ${{ secrets.MAVENUSERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVENPASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNINGKEY }}
SIGNING_KEY_ID: ${{ secrets.SIGNINGKEYID }}
SIGNING_PASSWORD: ${{ secrets.SIGNINGPASSWORD }}
run: ./gradlew publish -PSONATYPE_AUTOMATIC_RELEASE=true -PmavenCentralUsername=$MAVEN_USERNAME -PmavenCentralPassword=$MAVEN_PASSWORD -PsigningInMemoryKeyId=$SIGNING_KEY_ID -PsigningInMemoryKeyPassword=$SIGNING_PASSWORD -PsigningInMemoryKey=$SIGNING_KEY

0 comments on commit a8eadc3

Please sign in to comment.