File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to GitHub Packages
2
+ on :
3
+ release :
4
+ types : [published]
5
+
6
+ jobs :
7
+ publish-to-nuget :
8
+ name : Publish release to GitHub Packages
9
+ uses : markwhitaker/shared-workflows/.github/workflows/gradle-publish-to-github-packages.yml@main
10
+ secrets : inherit
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ buildscript {
5
5
plugins {
6
6
id ' java-library'
7
7
id ' com.palantir.git-version' version ' 0.15.0'
8
+ id ' maven-publish'
8
9
}
9
10
10
11
repositories {
@@ -19,3 +20,21 @@ sourceCompatibility = JavaVersion.VERSION_1_8
19
20
dependencies {
20
21
testImplementation " junit:junit:$junit_version "
21
22
}
23
+
24
+ publishing {
25
+ repositories {
26
+ maven {
27
+ name = " GitHubPackages"
28
+ url = uri(" https://maven.pkg.github.com/markwhitaker/mimetypes.java" )
29
+ credentials {
30
+ username = project. findProperty(" gpr.user" ) ?: System . getenv(" USERNAME" )
31
+ password = project. findProperty(" gpr.key" ) ?: System . getenv(" TOKEN" )
32
+ }
33
+ }
34
+ }
35
+ publications {
36
+ gpr(MavenPublication ) {
37
+ from(components. java)
38
+ }
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments