-
Notifications
You must be signed in to change notification settings - Fork 832
52 lines (45 loc) · 1.66 KB
/
release.yml
File metadata and controls
52 lines (45 loc) · 1.66 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
---
name: Deploy to Maven Central
on:
push:
tags:
- "v*.*.*"
jobs:
deploy:
if: ${{ github.repository == 'prometheus/client_java' }}
runs-on: ubuntu-24.04
permissions: {}
steps:
- name: Debug gpg key
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
run: |
echo "${#GPG_SIGNING_KEY}"
echo "${GPG_SIGNING_KEY}" | gpg --batch --import-options import-show --import
- name: Checkout Plugin Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: jdx/mise-action@e79ddf65a11cec7b0e882bedced08d6e976efb2d # v3.6.2
with:
version: v2026.2.24
sha256: c6e8b1abbd02d4beb7f38c98174e647b4ae40e89422465bc3b49e48c0bdf9ba9
cache: false
- name: Build release version
run: mise run build-release
- name: Set up Apache Maven Central
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
distribution: "temurin"
java-version: "21"
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Apache Maven Central
run: mvn deploy -P 'release,!default' -Dmaven.test.skip=true
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_MAVEN_REPOSITORY_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_REPOSITORY_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}