-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Build and Github Workflows (#608)
* fix: resolve custom groovy version * build: update build and github workflows - Fix resolution of custom groovy version - Remove use of user/pass auth for remote build cache - Other miscellaneous updates * ci: pr feedback * ci: update step names
- Loading branch information
Showing
6 changed files
with
76 additions
and
121 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,12 @@ env: | |
GIT_USER_EMAIL: '[email protected]' | ||
jobs: | ||
test_project: | ||
runs-on: ubuntu-latest | ||
name: "Test Project" | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read | ||
packages: read | ||
steps: | ||
- name: "📥 Checkout repository" | ||
uses: actions/checkout@v4 | ||
|
@@ -24,18 +28,18 @@ jobs: | |
- name: "🐘 Setup Gradle" | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | ||
- name: "🏃 Run Tests" | ||
env: | ||
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
./gradlew | ||
check | ||
run: ./gradlew check | ||
build_project: | ||
runs-on: ubuntu-latest | ||
name: "Build Project" | ||
if: github.event_name == 'push' | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read | ||
packages: read | ||
steps: | ||
- name: "📥 Checkout repository" | ||
uses: actions/checkout@v4 | ||
|
@@ -47,36 +51,23 @@ jobs: | |
- name: "🐘 Setup Gradle" | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | ||
- name: "🔨 Build project" | ||
env: | ||
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
./gradlew | ||
build | ||
run: ./gradlew build --continue | ||
- name: "📤 Publish Snapshot Artifacts to Artifactory (repo.grails.org)" | ||
if: success() | ||
env: | ||
DEVELOVITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
ORG_GRADLE_PROJECT_artifactoryUsername: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
ORG_GRADLE_PROJECT_artifactoryPassword: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
./gradlew | ||
-Dorg.gradle.internal.publish.checksums.insecure=true | ||
publish | ||
- name: "📖 Generate Snapshot Documentation" | ||
if: success() | ||
env: | ||
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
./gradlew | ||
views-docs:docs | ||
run: ./gradlew views-docs:docs | ||
- name: "📤 Publish Snapshot Documentation to Github Pages" | ||
if: success() | ||
uses: grails/github-pages-deploy-action@grails | ||
|
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 |
---|---|---|
|
@@ -7,9 +7,13 @@ env: | |
GIT_USER_EMAIL: '[email protected]' | ||
jobs: | ||
publish: | ||
name: "Publish to Sonatype Staging Repository" | ||
outputs: | ||
release_version: ${{ steps.release_version.outputs.value }} | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read | ||
packages: read | ||
steps: | ||
- name: "📥 Checkout repository" | ||
uses: actions/checkout@v4 | ||
|
@@ -21,56 +25,41 @@ jobs: | |
- name: "🐘 Setup Gradle" | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | ||
- name: "📝 Store the current release version" | ||
id: release_version | ||
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT | ||
- name: "⚙ Run pre-release" | ||
- name: "⚙️ Run pre-release" | ||
uses: grails/github-actions/pre-release@main | ||
- name: "🧩 Run Assemble" | ||
if: success() | ||
id: assemble | ||
env: | ||
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: ./gradlew assemble | ||
- name: "📤 Upload Distribution" | ||
if: success() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: grails-views-${{ steps.release_version.outputs.value }} | ||
path: ./**/build/libs/* | ||
- name: "🔐 Generate key file for artifact signing" | ||
env: | ||
SECRING_FILE: ${{ secrets.SECRING_FILE }} | ||
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg | ||
- name: "📤 Publish release artifacts to Sonatype" | ||
- name: "📤 Publish to and close Sonatype staging repository" | ||
env: | ||
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
ORG_GRADLE_PROJECT_sonatypeOssUsername: ${{ secrets.SONATYPE_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypeOssPassword: ${{ secrets.SONATYPE_PASSWORD }} | ||
ORG_GRADLE_PROJECT_sonatypeOssStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
ORG_GRADLE_PROJECT_sonatypeOssRepo: ${{ secrets.SONATYPE_NEXUS_URL }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
./gradlew | ||
./gradlew --no-build-cache | ||
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg | ||
publishToSonatype | ||
closeSonatypeStagingRepository | ||
release: | ||
name: "Release Sonatype Staging Repository" | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read # limit to read access | ||
contents: read | ||
packages: read | ||
steps: | ||
- name: "📥 Checkout repository" | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
ref: v${{ needs.publish.outputs.release_version }} | ||
- name: "☕️ Setup JDK" | ||
uses: actions/setup-java@v4 | ||
|
@@ -80,35 +69,32 @@ jobs: | |
- name: "🐘 Setup Gradle" | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
- name: "🚪 Nexus Staging Close And Release" | ||
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | ||
- name: "🚀 Release Sonatype Staging Repository" | ||
env: | ||
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
ORG_GRADLE_PROJECT_sonatypeOssUsername: ${{ secrets.SONATYPE_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypeOssPassword: ${{ secrets.SONATYPE_PASSWORD }} | ||
ORG_GRADLE_PROJECT_sonatypeOssStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
ORG_GRADLE_PROJECT_sonatypeOssRepo: ${{ secrets.SONATYPE_NEXUS_URL }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
./gradlew | ||
findSonatypeStagingRepository | ||
releaseSonatypeStagingRepository | ||
- name: "⚙️ Run post-release" | ||
if: success() | ||
uses: grails/github-actions/post-release@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
docs: | ||
name: "Publish Documentation" | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: write | ||
packages: read | ||
steps: | ||
- name: "📥 Checkout repository" | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
ref: v${{ needs.publish.outputs.release_version }} | ||
- name: "☕️ Setup JDK" | ||
uses: actions/setup-java@v4 | ||
|
@@ -118,21 +104,16 @@ jobs: | |
- name: "🐘 Setup Gradle" | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | ||
- name: "📖 Generate Documentation" | ||
if: success() | ||
env: | ||
DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} | ||
DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} | ||
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
./gradlew | ||
views-docs:docs | ||
run: ./gradlew views-docs:docs | ||
- name: "📤 Publish Documentation to Github Pages" | ||
if: success() | ||
uses: grails/github-pages-deploy-action@grails | ||
env: | ||
BETA: ${{ contains(needs.publish.outputs.release_version, 'M') }} | ||
BETA: ${{ contains(needs.publish.outputs.release_version, 'M') || contains(needs.publish.outputs.release_version, 'RC') }} | ||
BRANCH: gh-pages | ||
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }} | ||
COMMIT_NAME: ${{ env.GIT_USER_NAME }} | ||
|
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
Oops, something went wrong.