generated from Kantis/kotlin-template
-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (46 loc) · 1.69 KB
/
release.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: release
on:
workflow_dispatch:
workflow_run:
workflows: [ "build" ]
branches: [ main ]
types:
- completed
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
with:
# git-versioning plugin requires all history, and HEAD (so it can find and compare tags)
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- uses: gradle/gradle-build-action@v2
- id: cache-kotlin-konan
uses: actions/cache@v3
with:
path: ~/.konan
key: ${{ runner.os }}-kotlin-konan
- name: Publish Sonatype
# unset GITHUB_ACTIONS (else git-versioning-plugin doesn't detect tags)
# disable parallel (Sonatype doesn't like it)
run: >
unset GITHUB_ACTIONS
./gradlew publishAllPublicationsToSonatypeReleaseRepository
--stacktrace
--info
--no-parallel
env:
ORG_GRADLE_PROJECT_ks3_enableKotlinMultiplatformJvm: true
ORG_GRADLE_PROJECT_ks3_enableKotlinMultiplatformJs: false
ORG_GRADLE_PROJECT_ks3_enableKotlinMultiplatformNative: false
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}