-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (49 loc) · 1.57 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
name: Publish a release
on:
push:
branches:
- main
tags:
- '*'
concurrency:
group: "release"
cancel-in-progress: false
jobs:
publish_archives:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout the repo
uses: actions/checkout@v3
with:
lfs: true
# https://github.com/gradle/gradle-build-action/issues/561
- name: Create Gradle files
run: |
cd ~
mkdir -p .gradle/ && touch .gradle/gradle.properties
- name: Set up Java
id: setup-java
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 17
- name: Setup Gradle Java installations paths
run: |
cd ~/.gradle
echo "org.gradle.java.installations.paths=${{ steps.setup-java.outputs.path }}" >> gradle.properties
- name: Setup gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: Assemble in parallel
run: ./gradlew publishToMavenLocal build
- name: Publish the artifacts
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ARTIFACT_SIGNING_PRIVATE_KEY }}
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-parallel --stacktrace
env:
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true