-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.35 KB
/
create-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
name: Create a new release tag
on:
workflow_dispatch:
inputs:
release:
description: 'Release version'
required: true
type: choice
options:
- pre-release
- patch
- minor
- major
permissions:
contents: write
actions: write
jobs:
create-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout code
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: gradle
- run: ./gradlew release -Prelease.versionIncrementer=incrementMajor
if: github.event.inputs.release == 'major'
- run: ./gradlew release -Prelease.versionIncrementer=incrementMinor
if: github.event.inputs.release == 'minor'
- run: ./gradlew release -Prelease.versionIncrementer=incrementPatch -Prelease.ignoreChanges=true
if: github.event.inputs.release == 'patch'
- run: ./gradlew release -Prelease.versionIncrementer=incrementPrerelease -Prelease.versionIncrementer.initialPreReleaseIfNotOnPrerelease=-rc1 -Prelease.ignoreChanges=true
if: github.event.inputs.release == 'pre-release'
publish-release:
needs: create-tag
uses: ./.github/workflows/release.yml
secrets: inherit