-
Notifications
You must be signed in to change notification settings - Fork 8
62 lines (50 loc) · 1.9 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
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
name: Release to Maven and Portal
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- name: Set up JDK
uses : actions/setup-java@v2
with :
distribution : 'adopt'
java-version : '14'
cache: 'gradle'
- name: Publish Maven release
run: ./gradlew publish --no-daemon --no-parallel
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
- name: Close Maven release
run: ./gradlew closeAndReleaseRepository --no-daemon --no-parallel
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
- name: Publish to Gradle Plugin Portal
run: ./gradlew publishPlugins
- name: Create new website docs version
run: ./gradlew versionDocs
- name: Set all versions in the root README to the new version
run: ./gradlew updateProjectReadmeVersionRefs
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
commit-message: Create new website docs version
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: version-website-docs
delete-branch: true
title: 'Create new website docs version'
labels: |
automerge
documentation
draft: false