-
Notifications
You must be signed in to change notification settings - Fork 9
40 lines (38 loc) · 1.43 KB
/
publish-ossrh-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
name: Release to Maven Central (Stage Release)
on:
push:
branches: [release]
jobs:
release:
if: github.repository == 'jdbc-observations/datasource-micrometer'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Validation
run: ./mvnw -B enforcer:enforce -Drules=requireReleaseDeps,requireReleaseVersion
- name: Deploy
run: ./mvnw -B javadoc:jar source:jar deploy -DaltDeploymentRepository=local::file:./target/staging-deploy -DskipTests
- name: Release
run: ./mvnw jreleaser:full-release -pl .
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v3
with:
name: jreleaser-release
path: |
target/jreleaser/trace.log
target/jreleaser/output.properties