-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.41 KB
/
deployment.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
name: Deployment
on:
workflow_dispatch:
inputs:
version_type:
description: 'Select version type:'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get next version
uses: reecetech/version-increment@2024.10.1
id: version
with:
scheme: semver
increment: ${{ github.event.inputs.version_type }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Prepare for publish
run: |
./gradlew publish \
-PreleaseVersion="${{ steps.version.outputs.version }}" \
-Psigning.keyId="${{ secrets.SIGNING_KEY_ID }}" \
-Psigning.password="${{ secrets.SIGNING_PASSWORD }}" \
-Psigning.secretKeyRingFile="${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}"
- name: Release in Maven Central
run: |
./gradlew jreleaserRelease \
-PreleaseVersion="${{ steps.version.outputs.version }}" \
-PmavenCentralUsername="${{ secrets.MAVEN_CENTRAL_USERNAME }}" \
-PmavenCentralPasswordToken="${{ secrets.MAVEN_CENTRAL_PASSWORD_TOKEN }}" \
-PgithubToken="${{ secrets.GITHUB_TOKEN }}"