-
Notifications
You must be signed in to change notification settings - Fork 7
36 lines (31 loc) · 1.1 KB
/
release-ossrh.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
25
26
27
28
29
30
31
32
33
34
35
36
name: Release ossrh
on:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
name: Release ossrh jobs
steps:
- uses: actions/checkout@v3
- name: Set up Apache Maven Central
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
# It needs to be the same as the id corresponding to the snapshot Repository in pom.xml
server-id: ossrh
# env variable for username in deploy
server-username: MAVEN_USERNAME
# env variable for token in deploy
server-password: MAVEN_CENTRAL_TOKEN
# Value of the GPG private key to import
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
# env variable for GPG private key passphrase
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Release to Apache Maven Central
run: mvn clean deploy -Prelease-ossrh
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}