File tree Expand file tree Collapse file tree 6 files changed +62
-16
lines changed Expand file tree Collapse file tree 6 files changed +62
-16
lines changed Original file line number Diff line number Diff line change
1
+ name : Continuous Integration
2
+ on : push
3
+ jobs :
4
+ build :
5
+ runs-on : ubuntu-latest
6
+ steps :
7
+ - uses : actions/checkout@v1
8
+ - name : Test
9
+ run : ./gradlew clean test
Original file line number Diff line number Diff line change
1
+ name : Publish on JitPack
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' *'
6
+ jobs :
7
+ build :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Checkout
11
+ uses : actions/checkout@v1
12
+ - name : Test
13
+ run : ./gradlew clean test
14
+ - name : Create release
15
+ uses : actions/create-release@v1
16
+ env :
17
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
18
+ with :
19
+ tag_name : ${{ github.ref }}
20
+ release_name : ${{ github.ref }}
21
+ draft : false
22
+ prerelease : false
23
+ - name : Publish on JitPack
24
+ env :
25
+ GITHUB_REF : ${{ github.ref }}
26
+ run : |
27
+ echo "https://jitpack.io/api/builds/com.github.${{ github.repository }}/${GITHUB_REF##*/}"
28
+ curl "https://jitpack.io/api/builds/com.github.${{ github.repository }}/${GITHUB_REF##*/}"
Original file line number Diff line number Diff line change 2
2
* .iml
3
3
.gradle
4
4
build
5
- out
6
- publish.sh
5
+ out
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ repositories {
21
21
```
22
22
- Add the dependency
23
23
```
24
- implementation 'com.github.DaikonWeb:daikon-gson:1.0.0'
24
+ implementation( 'com.github.DaikonWeb:daikon-gson:1.0.0')
25
25
```
26
26
27
27
### Maven
Original file line number Diff line number Diff line change @@ -2,30 +2,27 @@ plugins {
2
2
id ' org.jetbrains.kotlin.jvm' version ' 1.3.61'
3
3
}
4
4
5
- group ' daikon.gson'
6
- version ' 1.0.0'
7
-
8
5
repositories {
9
6
mavenCentral()
10
7
maven { url ' https://jitpack.io' }
11
8
}
12
9
13
10
dependencies {
14
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8"
15
- implementation " com.github.DaikonWeb:daikon:1.0.0"
16
- compile " com.google.code.gson:gson:2.8.6"
17
- testImplementation(" com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0" )
18
- testImplementation(" org.junit.jupiter:junit-jupiter-api:5.5.1" )
19
- testImplementation(" org.junit.jupiter:junit-jupiter-engine:5.5.1" )
20
- testImplementation(" net.wuerl.kotlin:assertj-core-kotlin:0.2.1" )
21
- testImplementation(" com.github.jkcclemens:khttp:0.1.0" )
11
+ implementation( ' org.jetbrains.kotlin:kotlin-stdlib-jdk8' )
12
+ implementation( ' com.github.DaikonWeb:daikon:1.0.0' )
13
+ compile( ' com.google.code.gson:gson:2.8.6' )
14
+ testImplementation(' com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0' )
15
+ testImplementation(' org.junit.jupiter:junit-jupiter-api:5.5.1' )
16
+ testImplementation(' org.junit.jupiter:junit-jupiter-engine:5.5.1' )
17
+ testImplementation(' net.wuerl.kotlin:assertj-core-kotlin:0.2.1' )
18
+ testImplementation(' com.github.jkcclemens:khttp:0.1.0' )
22
19
}
23
20
24
21
compileKotlin {
25
- kotlinOptions. jvmTarget = " 1.8"
22
+ kotlinOptions. jvmTarget = ' 1.8'
26
23
}
27
24
compileTestKotlin {
28
- kotlinOptions. jvmTarget = " 1.8"
25
+ kotlinOptions. jvmTarget = ' 1.8'
29
26
}
30
27
31
28
test {
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+ PROJECT_DIR=$( cd $( dirname $0 ) /..; pwd -P)
3
+ PROJECT_NAME=$( basename $PROJECT_DIR )
4
+ TAG=$1
5
+
6
+ sed -ie " s|'com.github.DaikonWeb:daikon:.*'|'com.github.DaikonWeb:daikon:${TAG} '|g" build.gradle
7
+ sed -ie " s|'com.github.DaikonWeb:${PROJECT_NAME} :.*'|'com.github.DaikonWeb:${PROJECT_NAME} :${TAG} '|g" README.md
8
+ sed -ie " s|<version>.*</version>|<version>${TAG} </version>|g" README.md
9
+
10
+ git commit -am " Release ${TAG} "
11
+ git tag $TAG
12
+ git push
13
+ git push --tags
You can’t perform that action at this time.
0 commit comments