Skip to content

Commit

Permalink
Update java-setup GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
kwart committed Aug 3, 2024
1 parent bb3396c commit cb5904b
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/push-snapshots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Apache Maven Central
uses: actions/setup-java@v2
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '8'
cache: 'maven'
- name: Publish to Apache Maven Central
run: |
PROJECT_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
Expand Down

0 comments on commit cb5904b

Please sign in to comment.