Skip to content

Commit dea0161

Browse files
committed
change to github packages for publishing
1 parent 9ec45d6 commit dea0161

File tree

6 files changed

+23
-50
lines changed

6 files changed

+23
-50
lines changed

.github/workflows/gradle-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v3
24+
- name: Set env
25+
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
2426
- name: Set up JDK 21
2527
uses: actions/setup-java@v3
2628
with:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.gradle/
22
build/
33
bin/
4-
gradle/
54
gradle.properties
65
.vscode
76
.DS_Store

build.gradle

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ plugins {
44
id 'signing'
55
}
66

7+
group = 'robaho.net'
8+
version = System.getenv("RELEASE_VERSION")
9+
710
repositories {
811
mavenCentral()
912
}
@@ -146,57 +149,18 @@ publish {
146149

147150
publishing {
148151
publications {
149-
maven(MavenPublication) {
150-
groupId = 'io.github.robaho'
151-
artifactId = 'httpserver'
152-
version = "1.0.6"
153-
154-
from components.java
155-
156-
pom {
157-
name = 'HttpServer'
158-
description = 'A modified http server based on the JDK version designed for Virtual Threads. Includes websocket support.'
159-
160-
signing {
161-
sign publishing.publications.maven
162-
sign configurations.archives
163-
}
164-
165-
url = 'https://github.com/robaho/httpserver'
166-
167-
scm {
168-
url = 'https://github.com/robaho/httpserver.git'
169-
}
170-
171-
licenses {
172-
license {
173-
name = 'gnu v2.0'
174-
url = 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.html'
175-
}
176-
license {
177-
name = 'nanohttpd'
178-
url = 'https://github.com/NanoHttpd/nanohttpd/blob/efb2ebf85a2b06f7c508aba9eaad5377e3a01e81/LICENSE.md'
179-
}
180-
}
181-
182-
developers {
183-
developer {
184-
id = 'robaho'
185-
name = 'Robert Engels'
186-
email = 'robaho@me.com'
187-
}
188-
}
189-
}
152+
gpr(MavenPublication) {
153+
from(components.java)
190154
}
191155
}
192156
repositories {
193157
maven {
194-
name = "OSSRH"
195-
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
158+
name = "GitHubPackages"
159+
url = uri("https://maven.pkg.github.com/robaho/closablequeue")
196160
credentials {
197-
username = "$maven_user"
198-
password = "$maven_password"
199-
}
161+
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
162+
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
163+
}
200164
}
201165
}
202166
}

gradle.properties

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home
2-
org.gradle.java.installations.paths=/site/drw/java/jdk-21
3-
# org.gradle.java.home=/site/drw/java/jdk-21
1+
# org.gradle.java.installations.paths=/site/drw/java/jdk-21
2+
# org.gradle.java.home=/site/drw/java/jdk-21
3+
# org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home
4+
org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home

gradle/wrapper/gradle-wrapper.jar

62.2 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)