Skip to content

Commit

Permalink
Changed GPG key import method (#479)
Browse files Browse the repository at this point in the history
Now uses setup-java action.
  • Loading branch information
freemanjp committed Aug 1, 2022
1 parent c149638 commit 2dd8dc3
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/maven-deploy.yml
Expand Up @@ -21,6 +21,7 @@ jobs:
with:
java-version: 8
distribution: 'temurin'
gpg-private-key: ${{ secrets.GPG_KEY }}
# Since code changes to this project are infrequent, and most commits
# change the pom.xml, we cache by date interval rather than file hash.
- name: Calculate cache interval
Expand All @@ -37,11 +38,6 @@ jobs:
key: ${{ runner.os }}-maven-${{ steps.cache-interval.outputs.CACHE_INTERVAL }}-deploy
restore-keys: |
${{ runner.os }}-maven-${{ steps.cache-interval.outputs.CACHE_INTERVAL }}
- name: Install GPG key
run: |-
gpg --batch --import-options import-show --import << EOF
${{ secrets.GPG_KEY }}
EOF
- name: Deploy with Maven
run: .github/scripts/deploy.sh
env:
Expand All @@ -50,9 +46,3 @@ jobs:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete GPG secret key
if: ${{ always() }}
run: gpg --batch --yes --delete-secret-keys ${{ secrets.GPG_KEY_NAME }} || true
- name: Delete GPG public key
if: ${{ always() }}
run: gpg --batch --yes --delete-keys ${{ secrets.GPG_KEY_NAME }}

0 comments on commit 2dd8dc3

Please sign in to comment.