-
Notifications
You must be signed in to change notification settings - Fork 12
58 lines (51 loc) · 1.63 KB
/
loxone-java-release.yml
File metadata and controls
58 lines (51 loc) · 1.63 KB
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
---
name: Loxone Java release
on:
workflow_dispatch:
inputs:
versionIncrement:
description: "What version number to increment"
required: true
type: choice
default: incrementPatch
options:
- incrementPatch
- incrementMinor
- incrementMajor
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
token: ${{ secrets.SMARTEON_GIT_TOKEN }}
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up git configuration
run: |
git config --global user.name 'Smarteon Git'
git config --global user.email 'accounts+git@smarteon.cz'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Release and push tag
shell: bash
run: |
# Fetch a full copy of the repo, as required by release plugin:
git fetch --tags --unshallow
# Run release:
./gradlew release -Prelease.versionIncrementer=${{ inputs.versionIncrement }}
- name: Publish to OSS Sonatype
shell: bash
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSS_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSS_PASS }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASS }}
run: |
./gradlew publishToMavenCentral