-
Notifications
You must be signed in to change notification settings - Fork 27
66 lines (55 loc) · 1.85 KB
/
publish-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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Publish Release
on:
push:
tags: [ "[0-9]+.[0-9]+.[0-9]+**" ]
permissions:
contents: write
concurrency:
group: publish-release-${{github.ref_name}}
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: adopt
- name: Build Artifacts & Documentation
uses: gradle/gradle-build-action@v2
with:
arguments: |
-PreleaseVersion=${{ github.ref_name }}
build -x test
- name: Publish Maven Release
uses: gradle/gradle-build-action@v2
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
with:
arguments: |
-PreleaseVersion=${{ github.ref_name }}
-PsonatypeUsername=${{ secrets.OSSRH_TOKEN_USER }}
-PsonatypePassword=${{ secrets.OSSRH_TOKEN_PASS }}
publishToSonatype
closeAndReleaseSonatypeStagingRepository
-x test
- name: Publish Documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
clean: false
folder: build/javadoc
- name: Publish GitHub Release
uses: gradle/gradle-build-action@v2
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
with:
arguments: |
-PreleaseVersion=${{ github.ref_name }}
-Pgithub.token=${{ secrets.GITHUB_TOKEN }}
githubRelease -x test