-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (48 loc) · 1.89 KB
/
release.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: release
on:
workflow_dispatch:
jobs:
release:
name: release
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
settings-path: ${{ github.workspace }}
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
# IMPORTANT: releasing to Maven Central requires sources, javadoc,
# in addition to binary artifacts, and everything must be GPG signed.
# Hence, we must fully build it.
- name: release prepare and perform
shell: bash
run: |
git config --global user.name "Adrian Herscu"
git config --global user.email "[email protected]"
chmod +x mvnw && ./mvnw release:prepare release:perform \
-s $GITHUB_WORKSPACE/settings.xml \
-Pmode-build-full
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
# ISSUE: this requires running from a tag, and the tag created
# by maven-release-plugin is committed with [skip ci], hence
# will not trigger a CI event...
# Disabling meanwhile since releases are pushed to Maven Central anyway.
# - uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: "${{ github.workspace }}/**/target/*.jar"