-
Notifications
You must be signed in to change notification settings - Fork 47
38 lines (33 loc) · 1.23 KB
/
release.yml
File metadata and controls
38 lines (33 loc) · 1.23 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
name: Release new version
permissions:
contents: write
on:
workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup git profile
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '17'
cache: maven
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # has to be read directly from secrets
gpg-passphrase: MAVEN_GPG_PASSPHRASE # default name used by maven-gpg-plugin
- name: Release
run: mvn -ntp -B release:clean release:prepare release:perform -P release -Darguments="-DskipTests"
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}