Skip to content

Commit

Permalink
Merge pull request #51 from grails/release-workflow
Browse files Browse the repository at this point in the history
Update Release Workflow
  • Loading branch information
puneetbehl authored Nov 20, 2023
2 parents a5b3ba6 + 508e6c7 commit 9e3c86d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,26 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
arguments: assemble
- name: Export Gradle Properties
uses: micronaut-projects/github-actions/export-gradle-properties@master
- name: Generate Documentation
if: success()
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: success()
uses: micronaut-projects/github-pages-deploy-action@grails
env:
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs
DOC_FOLDER: gh-pages
COMMIT_EMAIL: behlp@unityfoundation.io
COMMIT_NAME: Puneet Behl
- name: Run post-release
if: steps.publish.outcome == 'success'
uses: micronaut-projects/github-actions/post-release@master
Expand Down
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ tasks.register("publishGuide", grails.doc.gradle.PublishGuide) {
group = "documentation"
description = 'Generate Guide'
dependsOn = ["groovydoc"]
mustRunAfter = ["jar"]

targetDir = project.file("${buildDir}/docs")
sourceRepo = "https://github.com/${githubSlug}/edit/${githubBranch}/src/main/docs"
Expand Down Expand Up @@ -111,10 +112,12 @@ tasks.register("docs") {
dependsOn = ["groovydoc", "publishGuide"]
}

subprojects {
tasks.named("build").configure {
finalizedBy("docs")
}

subprojects {
version = rootProject.version

repositories {
mavenCentral()
maven { url 'https://repo.grails.org/grails/core' }
Expand Down

0 comments on commit 9e3c86d

Please sign in to comment.