Skip to content

Commit

Permalink
Merge pull request #38397 from gastaldi/remove_crazymax
Browse files Browse the repository at this point in the history
Use actions/setup-java GPG key feature
  • Loading branch information
gsmet authored Jan 26, 2024
2 parents b9f9072 + 54e68c6 commit 94cb682
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,19 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- uses: actions/checkout@v3

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- uses: actions/checkout@v4

- name: Set up JDK {java.version}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: {java.version}
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Configure Git author
run: |
Expand All @@ -67,6 +62,7 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Push changes to ${{github.base_ref}} branch
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,19 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- uses: actions/checkout@v3

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Configure Git author
run: |
Expand All @@ -67,6 +62,7 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Push changes to ${{github.base_ref}} branch
run: |
Expand Down

0 comments on commit 94cb682

Please sign in to comment.