-
Notifications
You must be signed in to change notification settings - Fork 70
24 lines (24 loc) · 987 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: Publish package to the Maven Central Repository and GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- uses: actions/checkout@v2
- name: maven-settings-action
uses: s4u/[email protected]
with:
servers: '[{"id": "sonatype-nexus-snapshots", "username": "${{ secrets.SONATYPE_NEXUS_USERNAME }}", "password": "${{ secrets.SONATYPE_NEXUS_PASSWORD }}"},{"id": "sonatype-nexus-staging", "username": "${{ secrets.SONATYPE_NEXUS_USERNAME }}", "password": "${{ secrets.SONATYPE_NEXUS_PASSWORD }}"}]'
- name: Publish to the Maven Central Repository
run: mvn --batch-mode deploy -P release