Skip to content

Commit 6cba73d

Browse files
committed
Setup snapshot publishing similar to the fields plugin
1 parent db529ec commit 6cba73d

File tree

4 files changed

+73
-82
lines changed

4 files changed

+73
-82
lines changed

.github/workflows/gradle-publish.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/gradle.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Java CI
2+
on:
3+
push:
4+
branches:
5+
- '[6-9]+.[0-9]+.x'
6+
pull_request:
7+
branches:
8+
- '[6-9]+.[0-9]+.x'
9+
workflow_dispatch:
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
env:
14+
WORKSPACE: ${{ github.workspace }}
15+
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
16+
SIGNING_KEYRING: ${{ secrets.SECRING_FILE }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Setup up node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '20.5.1'
23+
- run: npm install
24+
- run: npm install --global gulp-cli
25+
- run: npm gulp grailsRelease
26+
- name: Set up JDK
27+
uses: actions/setup-java@v4
28+
with:
29+
distribution: 'liberica'
30+
java-version: '11'
31+
- name: Setup Gradle
32+
uses: gradle/gradle-build-action@v3
33+
- name: Run build with Gradle Wrapper
34+
run: ./gradlew build -Dgeb.env=chromeHeadless
35+
working-directory: plugin
36+
publish:
37+
if: github.event_name == 'push'
38+
needs: ['build']
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Setup up node
43+
uses: actions/setup-node@v3
44+
with:
45+
node-version: '20.5.1'
46+
- run: npm install
47+
- run: npm install --global gulp-cli
48+
- run: npm gulp grailsRelease
49+
- name: Set up JDK
50+
uses: actions/setup-java@v4
51+
with:
52+
distribution: 'liberica'
53+
java-version: '11'
54+
- name: Setup Gradle
55+
uses: gradle/gradle-build-action@v3
56+
- name: Publish Artifacts (repo.grails.org)
57+
id: publish
58+
env:
59+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
60+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
61+
working-directory: plugin
62+
run: ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish

plugin/build.gradle

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
id "application"
88
id "eclipse"
99
id "com.gorylenko.gradle-git-properties"
10-
id "maven-publish"
10+
id "org.grails.internal.grails-plugin-publish"
1111
}
1212

1313
group "org.grails.plugins"
@@ -58,7 +58,7 @@ application {
5858
}
5959

6060
java {
61-
sourceCompatibility = JavaVersion.toVersion("11")
61+
sourceCompatibility = JavaVersion.toVersion(11)
6262
}
6363

6464
bootRun {
@@ -131,36 +131,13 @@ tasks.withType(Test) {
131131
// enable if you wish to package this plugin as a standalone application
132132
bootJar.enabled = false
133133

134-
135-
publishing {
136-
137-
publications {
138-
mavenJar(MavenPublication) {
139-
from components.java
140-
artifact sourceJar
141-
artifact packageJavadoc
142-
artifact packageGroovydoc
143-
}
144-
}
145-
146-
repositories {
147-
maven {
148-
name = "GitHubPackages"
149-
url = uri("https://maven.pkg.github.com/gpc/grails-web-console")
150-
credentials {
151-
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
152-
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
153-
}
154-
}
155-
maven {
156-
name = "NexusRepo"
157-
credentials {
158-
username project.findProperty("nexusUsername") ?: System.getenv("NEXUS_USERNAME")
159-
password project.findProperty("nexusPassword") ?: System.getenv("NEXUS_PASSWORD")
160-
}
161-
url project.findProperty("nexusUrl") ?: System.getenv("NEXUS_URL")
162-
allowInsecureProtocol = project.findProperty("isNexusUrlInsecure") ? true : false
163-
}
164-
134+
grailsPublish {
135+
userOrg = "grails"
136+
githubSlug = 'gpc/grails-web-console'
137+
license {
138+
name = 'Apache-2.0'
165139
}
140+
title = "Grails Web Console Plugin"
141+
desc = "A web-based Groovy console for interactive runtime application management and debugging"
142+
developers = [ziegfried: 'Siegfried Puchbauer', mingfai: 'Mingfai Ma', burtbeckwith: 'Burt Beckwith', sheehan: 'Matt Sheehan', mjhugo: 'Mike Hugo', kdybicz: 'Kamil Dybicz', vsachinv: 'vsachinv' ]
166143
}

plugin/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
grailsVersion=6.2.0
22
grailsGradlePluginVersion=6.1.2
3-
version=6.0-M2
3+
version=6.0.0-SNAPSHOT
44
org.gradle.caching=true
55
org.gradle.daemon=true
66
org.gradle.parallel=true

0 commit comments

Comments
 (0)