-
Notifications
You must be signed in to change notification settings - Fork 240
69 lines (63 loc) · 2.08 KB
/
release-support-stream.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
67
68
69
name: Support Stream Branch Publish to the Maven Central Repository
on:
workflow_dispatch:
branches:
- 'support/**'
inputs:
version:
description: "Version to be released"
required: true
type: string
branch:
description: "Branch to be released"
required: true
default: 'support/2.3.X'
type: choice
options:
- 'support/2.3.X'
- 'support/3.0.X'
java-version:
description: "Java version"
required: true
default: '21'
type: choice
options:
- '21'
- '17'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{github.event.inputs.branch}}
token: ${{ secrets.RELEASE_PERSONAL_ACCESS_TOKEN }}
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: ${{github.event.inputs.java-version}}
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
cache: 'maven'
- name: Update version
if: ${{ success() }}
run: ./mvnw --batch-mode --no-transfer-progress versions:set -DnewVersion=${{github.event.inputs.version}} -Dgib.disable versions:commit
- name: Publish to the Maven Central Repository
if: ${{ success() }}
run: ./mvnw --batch-mode --no-transfer-progress -Dgib.disable=true -P ossrh -DskipTests deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Commit & Push changes
if: ${{ success() }}
uses: actions-js/push@v1.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'Release ${{github.event.inputs.version}}'
branch: ${{github.event.inputs.branch}}