-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (51 loc) · 1.83 KB
/
Copy pathpublish.yml
File metadata and controls
58 lines (51 loc) · 1.83 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
name: Publish to Maven Central
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
environment: maven
steps:
- name: Checkout (with zstd submodule)
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 25 with Maven Central publishing
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'zulu'
cache: 'maven'
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Set up Zig
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2
with:
version: 0.16.0
- name: Publish to Maven Central
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# Exclude internal modules from the published reactor. The
# central-publishing plugin aggregates the whole reactor and does not
# honor maven.deploy.skip, so drop them here (belt-and-suspenders with
# the plugin's excludeArtifacts in the root pom).
run: ./mvnw deploy -Prelease -DskipTests --batch-mode -ntp -pl '!integration-tests,!benchmark'
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
NOTES=$(awk "/^## \[$VERSION\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md)
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--notes "$NOTES" \
--verify-tag