-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (52 loc) · 2.31 KB
/
publish.yaml
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
59
60
61
name: Publish
on: push
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=\"-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false\" -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dkotlin.daemon.jvm.options=-Xmx8G,-XX:MaxMetaspaceSize=512m,-Dorg.gradle.daemon=false,-Dkotlin.incremental=false"
JAVA_OPTS: "-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
SIGNING_SECRET_KEY_RING_FILE: ${{ github.workspace }}/kaluga-library-components/keys/secret-keys.gpg
concurrency: publish-${{ github.ref_name }}
jobs:
publish:
env:
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
runs-on: ${{ github.ref_name == 'master' && 'tartelet' || 'macos-14' }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
# remove VM settings as defined for using the IDE
- run: sed -i '' -e '/org.gradle.jvmargs/d' gradle.properties; cat gradle.properties
# TODO: use setup_tools_macos
- name : set up JDK 17
uses : actions/setup-java@v4
with :
distribution : 'temurin'
java-version : 17
- name: Konan cache
uses: actions/cache@v4
id: konan-cache
with:
path: ~/.konan/*
key: konan
- name: Install Android SDK
id: android_sdk_install
uses: android-actions/setup-android@v3
with:
log-accepted-android-sdk-licenses: false
# We're seeing some issues with publishing to Sonatype due to split up repos. By publishing to MavenLocal first we might circumvent this
- name: "Publish MavenLocal"
env:
MAVEN_CENTRAL_RELEASE: ${{ github.ref_name == 'master' }}
run: ./gradlew publishToMavenLocal --stacktrace
- name: "Publish SNAPSHOT"
if: ${{ github.ref_name != 'master' }}
run: ./gradlew publishAllPublicationsToSnapshotsRepository --stacktrace
- name: "Publish Maven Central"
if: ${{ github.ref_name == 'master' }}
env:
MAVEN_CENTRAL_RELEASE: "true"
run: ./gradlew publishAllPublicationsToSonatypeRepository --stacktrace --no-parallel