-
Notifications
You must be signed in to change notification settings - Fork 121
63 lines (61 loc) · 2.14 KB
/
publish.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
name: Publish to Maven Central
on:
release:
types: [published]
permissions: read-all
jobs:
publish:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
with:
ref: ${{ github.event.release.target_commitish }}
- name: Setup Java
uses: actions/setup-java@3b6c050358614dd082e53cdbc55580431fc4e437
with:
java-version: 21
distribution: 'temurin'
cache: maven
server-id: nexus-releases
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.SIGNING_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish package
env:
MAVEN_USERNAME: ${{ secrets.OSS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }}
run: mvn -e --no-transfer-progress --batch-mode deploy -P release-sign-artifacts
notify-release:
runs-on: ubuntu-latest
name: Notify Release
strategy:
matrix:
url: [SLACK_WEBHOOK_ASK_DEVREL_URL, SLACK_WEBHOOK_DEVREL_TOOLING_URL, SLACK_WEBHOOK_DEVREL_PRIVATE_URL, SLACK_WEBHOOK_COMMUNITY]
steps:
- name: Send to Slack channels
uses: slackapi/[email protected]
with:
webhook: ${{ secrets[matrix.url] }}
webhook-type: incoming-webhook
errors: true
payload: |
blocks:
- type: "header"
text:
type: "plain_text"
text: ":initial_external_notification_sent: Java Server SDK ${{ github.event.release.name }} has been released."
- type: "section"
text:
type: "mrkdwn"
text: "${{ github.event.release.body }}"
- type: "divider"
- type: "section"
text:
type: "mrkdwn"
text: "View the full change log <${{ github.event.release.html_url }}|here>."