forked from jline/jline3
-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (78 loc) · 2.73 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Manual Run automatic Maven Release
on: workflow_dispatch
jobs:
release:
name: Release to Maven Central
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.ref_name }}
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '22'
cache: maven
server-id: central
server-username: NEXUS_USER
server-password: NEXUS_PASSWORD
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY_GITHUB_TECHUSER }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Setup Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: '3.9.8'
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY_GITHUB_TECHUSER }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
fingerprint: '0181A4828FA27B6BE6F1F5A68611CD28F472E006'
- name: Diag
run: |
echo "====================="
echo " Maven"
echo "====================="
mvn -v
echo "====================="
echo " Global settings"
echo "====================="
cat $HOME/.m2/settings.xml
echo ""
echo "====================="
echo " Git config"
echo "====================="
git config -l --global
- name: Release
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_GPG_KEY_FINGERPRINT: '0x0181A4828FA27B6BE6F1F5A68611CD28F472E006!'
run: |
mvn -B release:prepare release:perform -Darguments="-DskipTests"
# - name: Test
# run: |
# gpg --sign pom.xml
# git add pom.xml.gpg
# git commit -m "Sign pom"
# git push
# - name: Release
# run: |
# mvn release:prepare
#
# - name: Release
# uses: speter555/[email protected]
# with:
# NEXUS_USER: ${{ secrets.NEXUS_USER }}
# NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
# ARTIFACT_STORE_SERVER_ID: ''
# SETTINGS_XML_PATH: '.github/.m2/settings.xml'
# GPG_KEY_ID_GITHUB_TECHUSER: '8611CD28F472E006'
# GPG_SIGNING_KEY_GITHUB_TECHUSER: ${{ secrets.GPG_SIGNING_KEY_GITHUB_TECHUSER }}
# SSH_PRIVATE_KEY_GITHUB_TECHUSER: ${{ secrets.SSH_PRIVATE_KEY_GITHUB_TECHUSER }}
# TECH_USER_USERNAME: 'gnodet'
# TECH_USER_EMAIL: '[email protected]'
# JAVA_VERSION: '22'
# JAVA_DISTRIBUTION: 'temurin'