-
-
Notifications
You must be signed in to change notification settings - Fork 94
81 lines (72 loc) · 2.08 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Release LITIENGINE
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
incrementVersion:
type: choice
description: "increment version?"
required: true
default: 'none'
options:
- NO
- PATCH
- MINOR
- MAJOR
schedule:
# Midnight every day
- cron: "0 0 * * *"
jobs:
gradle:
name: Release build
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 19
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 19
- name: Print project version
uses: gradle/gradle-build-action@v2
with:
arguments: printGitSemVer
- name: Increment patch version
if: inputs.incrementVersion == 'PATCH'
uses: gradle/gradle-build-action@v2
with:
arguments: incrementPatchVersion
- name: Increment minor version
if: inputs.incrementVersion == 'MINOR'
uses: gradle/gradle-build-action@v2
with:
arguments: incrementMinorVersion
- name: Increment major version
if: inputs.incrementVersion == 'MAJOR'
uses: gradle/gradle-build-action@v2
with:
arguments: incrementMajorVersion
- name: Push tags
if: inputs.incrementVersion != 'NO'
uses: gradle/gradle-build-action@v2
env:
GRGIT_USER: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: pushTags
- name: Publish
uses: gradle/gradle-build-action@v2
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }}
with:
arguments: |
publishToSonatype closeSonatypeStagingRepository