-
Notifications
You must be signed in to change notification settings - Fork 229
61 lines (55 loc) · 2.09 KB
/
release.yml
File metadata and controls
61 lines (55 loc) · 2.09 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release
on:
workflow_dispatch:
jobs:
publish:
name: Publish
if: github.repository == 'slackapi/java-slack-sdk'
runs-on: ubuntu-latest
environment: central
permissions:
contents: read
steps:
- name: Checkout the repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up JDK 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: "17"
distribution: "adopt"
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Add snapshot server credentials
run: |
sed -i '/<\/servers>/i \
<server>\
<id>central-snapshots</id>\
<username>${env.MAVEN_USERNAME}</username>\
<password>${env.MAVEN_PASSWORD}</password>\
</server>' ~/.m2/settings.xml
- name: Configure GPG
run: |
echo "use-agent" >> ~/.gnupg/gpg.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo RELOADAGENT | gpg-connect-agent
- name: Publish to Maven Central
run: |
./mvnw clean deploy \
-P production-releases \
-D maven.test.skip=true \
-D gpg.passphrase="${MAVEN_GPG_PASSPHRASE}" \
-pl !bolt-kotlin-examples \
-pl !bolt-quarkus-examples \
--batch-mode \
--no-transfer-progress
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"