-
Notifications
You must be signed in to change notification settings - Fork 97
32 lines (30 loc) · 1.42 KB
/
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
name: Release
on:
release: #note: fortunately this event is not triggered for draft releases, as `released` could include drafts
types: [ prereleased, released ]
jobs:
publishRelease:
runs-on: ubuntu-20.04
environment: release
steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: Publish Release
if: endsWith(github.event.release.tag_name, '.RELEASE')
run: ./gradlew --no-daemon -Pversion="${{github.event.release.tag_name}}" sign publish
env:
GRADLE_PUBLISH_REPO_URL: https://s01.oss.sonatype.org/service/local/staging/deploy/maven2
GRADLE_PUBLISH_MAVEN_USER: ${{secrets.MAVEN_USER}}
GRADLE_PUBLISH_MAVEN_PASSWORD: ${{secrets.MAVEN_PASSWORD}}
GRADLE_SIGNING_KEY: ${{secrets.SIGNING_KEY}}
GRADLE_SIGNING_PASSWORD: ${{secrets.SIGNING_PASSPHRASE}}
- name: Publish Milestone
if: github.event.release.prerelease && (contains(github.event.release.tag_name, '.M') || contains(github.event.release.tag_name, '.RC'))
run: ./gradlew --no-daemon -Pversion="${{github.event.release.tag_name}}" publish
env:
GRADLE_PUBLISH_REPO_URL: https://repo.spring.io/libs-milestone-local/
GRADLE_PUBLISH_MAVEN_USER: ${{secrets.ARTIFACTORY_USERNAME}}
GRADLE_PUBLISH_MAVEN_PASSWORD: ${{secrets.ARTIFACTORY_PASSWORD}}