File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ branches :
4
+ - master
5
+ pull_request :
6
+ branches :
7
+ - master
8
+ jobs :
9
+ # Build the gradle jar
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v2
15
+ - name : Set up JDK 11
16
+ uses : actions/setup-java@v1
17
+ with :
18
+ java-version : 11
19
+ - name : Build with Gradle
20
+ run : ./gradlew build
Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ branches :
4
+ - master
5
+ jobs :
6
+ publish-jar :
7
+ needs : build
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Checkout
11
+ uses : actions/checkout@v2
12
+ - name : Set up JDK 11
13
+ uses : actions/setup-java@v1
14
+ with :
15
+ java-version : 11
16
+ - name : Publish to GitHub Packages
17
+ run : ./gradlew build publish
18
+ env :
19
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
1
plugins {
2
2
`java- library`
3
+ `maven- publish`
3
4
}
4
5
5
6
group = " com.github.jsixface"
@@ -18,3 +19,21 @@ dependencies {
18
19
implementation(libs.snakeyaml)
19
20
testImplementation(libs.junit)
20
21
}
22
+
23
+ publishing {
24
+ publications {
25
+ create<MavenPublication >(" mavenJava" ) {
26
+ from(components[" java" ])
27
+ }
28
+ }
29
+ repositories {
30
+ maven {
31
+ name = " GitHubPackages"
32
+ url = uri(" https://maven.pkg.github.com/jsixface/yamlconfig" )
33
+ credentials {
34
+ username = System .getenv(" GITHUB_ACTOR" )
35
+ password = System .getenv(" GITHUB_TOKEN" )
36
+ }
37
+ }
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments