File tree Expand file tree Collapse file tree 3 files changed +67
-4
lines changed Expand file tree Collapse file tree 3 files changed +67
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish release
2
+ on :
3
+ release :
4
+ types : [published]
5
+
6
+ jobs :
7
+ publish_release :
8
+ name : Publish Release
9
+ runs-on : macOS-latest
10
+ steps :
11
+ - name : Checkout
12
+ uses : actions/checkout@v2
13
+ with :
14
+ lfs : true
15
+ - name : Cache gradle dependencies
16
+ uses : actions/cache@v2
17
+ with :
18
+ path : ~/.gradle/caches
19
+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
20
+ restore-keys : |
21
+ ${{ runner.os }}-gradle-
22
+ - name : Cache Kotlin Native dependencies
23
+ uses : actions/cache@v2
24
+ with :
25
+ path : |
26
+ ~/.konan/kotlin-native-macos-*
27
+ ~/.konan/dependencies
28
+ key : ${{ runner.os }}-kotlin-native-${{ hashFiles('build.gradle') }}
29
+ restore-keys : |
30
+ ${{ runner.os }}-kotlin-native-
31
+ - name : Set up JDK 1.8
32
+ uses : actions/setup-java@v1
33
+ with :
34
+ java-version : 1.8
35
+ - name : Select Xcode 11.4
36
+ run : sudo xcode-select -s /Applications/Xcode_11.4.app
37
+ - name : Publish artifacts
38
+ env :
39
+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
40
+ MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
41
+ run : ./gradlew library:publish
Original file line number Diff line number Diff line change 1
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
2
-
3
1
buildscript {
4
2
ext. kotlin_version = ' 1.3.72'
5
3
repositories {
@@ -15,10 +13,14 @@ buildscript {
15
13
}
16
14
}
17
15
16
+ plugins {
17
+ id ' pl.allegro.tech.build.axion-release' version ' 1.12.0'
18
+ }
19
+
18
20
allprojects {
19
21
20
22
group ' dev.michallaskowski.mokttp'
21
- version = ' 0.0.1 '
23
+ version = scmVersion . version
22
24
23
25
repositories {
24
26
google()
Original file line number Diff line number Diff line change @@ -3,6 +3,24 @@ apply plugin: 'maven'
3
3
apply plugin : ' maven-publish'
4
4
apply plugin : ' com.android.library'
5
5
6
+ publishing {
7
+ publications {
8
+ kotlinMultiplatform. artifactId = " mokttp-common"
9
+ }
10
+ repositories {
11
+ maven {
12
+ name = " central"
13
+ def snapshotRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots"
14
+ def stagingRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2"
15
+ url = version. endsWith(' SNAPSHOT' ) ? snapshotRepoUrl : stagingRepoUrl
16
+ credentials {
17
+ username = System . getenv(" MAVEN_USERNAME" )
18
+ password = System . getenv(" MAVEN_PASSWORD" )
19
+ }
20
+ }
21
+ }
22
+ }
23
+
6
24
android {
7
25
compileSdkVersion 29
8
26
defaultConfig {
@@ -52,7 +70,9 @@ kotlin {
52
70
}
53
71
}
54
72
55
- fromPreset(presets. android, ' android' )
73
+ fromPreset(presets. android, ' android' ) {
74
+ publishAllLibraryVariants()
75
+ }
56
76
}
57
77
58
78
sourceSets {
You can’t perform that action at this time.
0 commit comments