-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (50 loc) · 1.48 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
name: Release
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to release from'
required: true
default: ''
type:
description: 'Release type (hotfix / minor / major)'
required: true
default: 'minor'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: kanga333/[email protected]
with:
key: "${{ github.event.inputs.type }}"
map: |
{
"hotfix": {
"releaseType": "incrementPatch"
},
"minor": {
"releaseType": "incrementMinor"
},
"major": {
"releaseType": "incrementMajor"
},
".*": {
"releaseType": "invalid"
}
}
- name: Checkout the selected branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '8'
- name: Local release
run: ./gradlew :createRelease -Prelease.versionIncrementer=${{ env.releaseType }}
- name: Verify build
run: ./gradlew build test javadoc publishToLocalDocker
- name: Push release to repository
run: ./gradlew :pushRelease -Prelease.customUsername="${{ github.actor }}" -Prelease.customPassword="${{ github.token }}"