-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/6.0.x' into 7.0.x
- Loading branch information
Showing
5 changed files
with
194 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,12 @@ on: | |
release: | ||
types: [published] | ||
jobs: | ||
release: | ||
publish: | ||
outputs: | ||
release_version: ${{ steps.release_version.outputs.value }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: ['11'] | ||
permissions: | ||
contents: read | ||
env: | ||
GIT_USER_NAME: puneetbehl | ||
GIT_USER_EMAIL: [email protected] | ||
|
@@ -21,14 +22,30 @@ jobs: | |
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: ${{ matrix.java }} | ||
java-version: '11' | ||
- name: Set the current release version | ||
id: release_version | ||
run: echo "release_version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT | ||
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT | ||
- name: Run pre-release | ||
uses: micronaut-projects/github-actions/pre-release@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Run Assemble | ||
if: success() | ||
id: assemble | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
arguments: assemble | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
- name: Upload Distribution | ||
if: success() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: grails-gsp-${{ steps.release_version.outputs.value }} | ||
path: ./**/build/libs/* | ||
- name: Generate secring file | ||
env: | ||
SECRING_FILE: ${{ secrets.SECRING_FILE }} | ||
|
@@ -37,28 +54,78 @@ jobs: | |
id: publish | ||
uses: gradle/gradle-build-action@v3 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} | ||
SECRING_FILE: ${{ secrets.SECRING_FILE }} | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
with: | ||
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
- name: Publish Documentation | ||
id: docs | ||
if: steps.publish.outcome == 'success' | ||
arguments: | | ||
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg | ||
publishToSonatype | ||
closeSonatypeStagingRepository | ||
release: | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
ref: v${{ needs.publish.outputs.release_version }} | ||
- name: Nexus Staging Close And Release | ||
uses: gradle/gradle-build-action@v3 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
with: | ||
arguments: | | ||
findSonatypeStagingRepository | ||
releaseSonatypeStagingRepository | ||
- name: Run post-release | ||
if: success() | ||
uses: micronaut-projects/github-actions/post-release@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
env: | ||
SNAPSHOT_SUFFIX: -SNAPSHOT | ||
docs: | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
ref: v${{ needs.publish.outputs.release_version }} | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
- name: Publish Documentation | ||
id: docs | ||
if: success() || false | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: docs | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
- name: Publish to Github Pages | ||
if: steps.docs.outcome == 'success' | ||
uses: grails/github-pages-deploy-action@v2 | ||
|
@@ -71,11 +138,4 @@ jobs: | |
DOC_FOLDER: gh-pages | ||
COMMIT_EMAIL: [email protected] | ||
COMMIT_NAME: Puneet Behl | ||
VERSION: ${{ steps.release_version.outputs.release_version }} | ||
- name: Run post-release | ||
if: steps.publish.outcome == 'success' && steps.docs.outcome == 'success' && success() | ||
uses: micronaut-projects/github-actions/post-release@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
env: | ||
SNAPSHOT_SUFFIX: -SNAPSHOT | ||
VERSION: ${{ steps.release_version.outputs.release_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
buildscript { | ||
repositories { | ||
maven { url "https://repo.grails.org/grails/core" } | ||
} | ||
dependencies { | ||
classpath "org.grails:grails-docs:${project.ext.properties.grailsDocsVersion ?: grailsVersion}" | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url "https://repo.grails.org/grails/core" } | ||
} | ||
|
||
configurations { | ||
documentation.extendsFrom(compileClasspath) | ||
} | ||
|
||
task publishGuide(type: grails.doc.gradle.PublishGuide) { | ||
group = 'documentation' | ||
description = 'Generate Guide' | ||
|
||
targetDir = project.file("${buildDir}/docs") | ||
sourceRepo = "https://github.com/${githubSlug}/edit/${githubBranch}/src/main/docs" | ||
sourceDir = new File(projectDir, "src/main/docs") | ||
resourcesDir = new File(projectDir, "src/main/docs/resources") | ||
propertiesFiles = [ new File(rootProject.projectDir, "gradle.properties") ] | ||
asciidoc = true | ||
properties = [ | ||
'safe':'UNSAFE', | ||
'version': project.version, | ||
'subtitle': project.projectDesc, | ||
'api': '../api', | ||
'sourceDir':rootProject.projectDir.absolutePath, | ||
'sourcedir':rootProject.projectDir.absolutePath, | ||
'javaee': 'https://docs.oracle.com/javaee/7/api/', | ||
'javase': 'https://docs.oracle.com/javase/7/docs/api/', | ||
'groovyapi': 'https://docs.groovy-lang.org/latest/html/gapi/', | ||
'grailsapi': 'https://docs.grails.org/latest/api/', | ||
'gormapi': 'https://gorm.grails.org/latest/api/', | ||
'springapi': 'https://docs.spring.io/spring/docs/current/javadoc-api/' | ||
] | ||
doLast { | ||
ant.move(file:"${project.buildDir}/docs/guide/single.html", | ||
tofile:"${project.buildDir}/docs/guide/index.html", overwrite:true) | ||
new File(project.buildDir, "docs/index.html").text = ''' | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:https://www.w3.org/TR/html4/loose.dtd"> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="refresh" content="0; url=guide/index.html" /> | ||
</head> | ||
</body> | ||
</html> | ||
''' | ||
} | ||
} | ||
|
||
task docs(dependsOn:[groovydoc, publishGuide]) { | ||
group = 'documentation' | ||
} | ||
|
||
//tasks.named("build") { | ||
// finalizedBy("docs") | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters