Skip to content

Commit

Permalink
Setup snapshot publishing similar to the fields plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Oct 15, 2024
1 parent db529ec commit fec8daa
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 82 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/gradle-publish.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Java CI
on:
push:
branches:
- '[6-9]+.[0-9]+.x'
pull_request:
branches:
- '[6-9]+.[0-9]+.x'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
SIGNING_KEYRING: ${{ secrets.SECRING_FILE }}
steps:
- uses: actions/checkout@v4
- name: Setup up node
uses: actions/setup-node@v3
with:
node-version: '20.5.1'
- run: npm install
- run: npm install --global gulp-cli
- run: npm gulp grailsRelease
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '11'
- name: Run Build
uses: gradle/gradle-build-action@v3
working-directory: plugin
run: ./gradlew build -Dgeb.env=chromeHeadless
publish:
if: github.event_name == 'push'
needs: ['build']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup up node
uses: actions/setup-node@v3
with:
node-version: '20.5.1'
- run: npm install
- run: npm install --global gulp-cli
- run: npm gulp grailsRelease
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '11'
- name: Publish Artifacts (repo.grails.org)
id: publish
uses: gradle/gradle-build-action@v3
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
working-directory: plugin
run: ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish
43 changes: 10 additions & 33 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id "application"
id "eclipse"
id "com.gorylenko.gradle-git-properties"
id "maven-publish"
id "org.grails.internal.grails-plugin-publish"
}

group "org.grails.plugins"
Expand Down Expand Up @@ -58,7 +58,7 @@ application {
}

java {
sourceCompatibility = JavaVersion.toVersion("11")
sourceCompatibility = JavaVersion.toVersion(11)
}

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


publishing {

publications {
mavenJar(MavenPublication) {
from components.java
artifact sourceJar
artifact packageJavadoc
artifact packageGroovydoc
}
}

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/gpc/grails-web-console")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
maven {
name = "NexusRepo"
credentials {
username project.findProperty("nexusUsername") ?: System.getenv("NEXUS_USERNAME")
password project.findProperty("nexusPassword") ?: System.getenv("NEXUS_PASSWORD")
}
url project.findProperty("nexusUrl") ?: System.getenv("NEXUS_URL")
allowInsecureProtocol = project.findProperty("isNexusUrlInsecure") ? true : false
}

grailsPublish {
userOrg = "grails"
githubSlug = 'gpc/grails-web-console'
license {
name = 'Apache-2.0'
}
title = "Grails Web Console Plugin"
desc = "A web-based Groovy console for interactive runtime application management and debugging"
developers = [ziegfried: 'Siegfried Puchbauer', mingfai: 'Mingfai Ma', burtbeckwith: 'Burt Beckwith', sheehan: 'Matt Sheehan', mjhugo: 'Mike Hugo', kdybicz: 'Kamil Dybicz', vsachinv: 'vsachinv' ]
}
2 changes: 1 addition & 1 deletion plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
grailsVersion=6.2.0
grailsGradlePluginVersion=6.1.2
version=6.0-M2
version=6.0.0-SNAPSHOT
org.gradle.caching=true
org.gradle.daemon=true
org.gradle.parallel=true
Expand Down

0 comments on commit fec8daa

Please sign in to comment.