-
Notifications
You must be signed in to change notification settings - Fork 26
44 lines (39 loc) · 1.6 KB
/
Copy pathrelease.yml
File metadata and controls
44 lines (39 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Release Builds
on:
release:
types: [ published ]
jobs:
build-project:
name: 'Release'
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ '8' ]
steps:
- uses: actions/checkout@v4
- name: Set up for Sonatype
uses: actions/setup-java@v3
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
check-latest: true
java-version: ${{ matrix.java }}
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME # env variable for username in deploy
server-password: SONATYPE_PASSWORD # env variable for token in deploy
gpg-private-key: ${{ secrets.GPG_AUTHOR_PRIVATEKEY }} # Value of the GPG private key to import
gpg-passphrase: GPG_AUTHOR_PASSPHRASE # env variable for GPG private key passphrase
- name: Publish to Sonatype (Staging)
run: mvn --batch-mode deploy -P'release' -Dchangelist= -DskipTests=true
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_AUTHOR_PASSPHRASE: ${{ secrets.GPG_AUTHOR_PASSPHRASE }}
# - name: Set up for GitHub Packages
# uses: actions/setup-java@v2
# with:
# java-version: '8'
# distribution: 'adopt'
# - name: Publish to GitHub Packages
# run: mvn --batch-mode deploy -P'release,deploy-github' -Dchangelist= -DskipTests=true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}