mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
update workflow to use GPG
This commit is contained in:
parent
ed183e6142
commit
e8f125fb6e
16
.github/workflows/deployment.yml
vendored
16
.github/workflows/deployment.yml
vendored
@ -1,4 +1,8 @@
|
|||||||
# For more information see: https://docs.github.com/en/actions/learn-github-actions or https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
|
# For more information see:
|
||||||
|
# * https://docs.github.com/en/actions/learn-github-actions
|
||||||
|
# * https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
|
||||||
|
# * https://github.com/actions/setup-java/blob/v3.13.0/docs/advanced-usage.md#Publishing-using-Apache-Maven
|
||||||
|
#
|
||||||
|
|
||||||
name: Deployment workflow
|
name: Deployment workflow
|
||||||
|
|
||||||
@ -20,14 +24,18 @@ jobs:
|
|||||||
# Use lowest supported LTS Java version
|
# Use lowest supported LTS Java version
|
||||||
java-version: '8'
|
java-version: '8'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
server-id: ossrh
|
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
server-username: MAVEN_USERNAME
|
server-username: MAVEN_USERNAME # env variable for username in deploy
|
||||||
server-password: MAVEN_PASSWORD
|
server-password: MAVEN_PASSWORD # env variable for token in deploy
|
||||||
|
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
|
||||||
|
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
|
||||||
|
|
||||||
- name: Publish to the Maven Central Repository
|
- name: Publish to the Maven Central Repository
|
||||||
run: mvn --batch-mode deploy
|
run: mvn --batch-mode deploy
|
||||||
env:
|
env:
|
||||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
||||||
|
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
||||||
# - name: Set up Java for publishing to GitHub Packages
|
# - name: Set up Java for publishing to GitHub Packages
|
||||||
# uses: actions/setup-java@v3
|
# uses: actions/setup-java@v3
|
||||||
# with:
|
# with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user