-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (39 loc) · 1.58 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
name: Release
concurrency: ci-${{ github.ref }}
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
# note that if an equivalent to this is run on another branch, the following cache action should only restore
- uses: actions/cache@v3
with:
path: |
.gradle/loom-cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- uses: gradle/gradle-build-action@v2
with:
arguments: checkLicenses build
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }}
- uses: gradle/gradle-build-action@v2
with:
arguments: publish closeAndReleaseSonatypeStagingRepository
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }}
env:
SONATYPE_USER: ${{ secrets.CENTRAL_MAVEN_USER }}
SONATYPE_PASSWORD: ${{ secrets.CENTRAL_MAVEN_PASSWORD }}
SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }}