Skip to content

Commit

Permalink
[skip ci] pre release workflow support
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Dec 22, 2024
1 parent d7500ee commit 7d17d17
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ jobs:
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: "🔨 Build project"
id: build
with:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build
- name: "🏃‍♀️Run functional tests"
with:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
cd spock-container-test-app
./gradlew check
Expand Down Expand Up @@ -58,7 +62,7 @@ jobs:
run: ./gradlew groovydoc
- name: "📤 Publish Snapshot Documentation to Github Pages"
if: steps.docs.outcome == 'success'
uses: micronaut-projects/github-pages-deploy-action@grails
uses: grails/github-pages-deploy-action@grails
env:
BRANCH: gh-pages
COMMIT_EMAIL: '[email protected]'
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
id: release_version
run: echo "release_version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
- name: "⚙ Run pre-release"
uses: micronaut-projects/github-actions/pre-release@master
uses: grails/github-actions/pre-release@main
- name: "🔐 Generate key file for artifact signing"
env:
SECRING_FILE: ${{ secrets.SECRING_FILE }}
Expand All @@ -39,6 +39,7 @@ jobs:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: >
./gradlew
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
Expand All @@ -47,12 +48,14 @@ jobs:
- name: "📖 Generate Documentation"
id: docs
if: steps.publish.outcome == 'success'
with:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew groovydoc
- name: "📝 Export Gradle Properties"
uses: micronaut-projects/github-actions/export-gradle-properties@master
uses: grails/github-actions/export-gradle-properties@main
- name: "📤 Publish to Github Pages"
if: steps.docs.outcome == 'success'
uses: micronaut-projects/github-pages-deploy-action@master
uses: grails/github-pages-deploy-action@main
env:
BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
BRANCH: gh-pages
Expand Down
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ tasks.withType(JavaCompile).configureEach {

repositories {
maven { url = 'https://repo.grails.org/grails/core' }
if (System.getenv("GITHUB_MAVEN_PASSWORD") && !grailsVersion.endsWith('-SNAPSHOT')) {
System.out.println("Adding Grails Core Repo for project ${project.name}")
maven {
url = 'https://maven.pkg.github.com/grails/grails-core'
credentials {
username = 'DOES_NOT_MATTER'
password = System.getenv("GITHUB_MAVEN_PASSWORD")
}
}
}
}

configurations.register('documentation')
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
projectVersion=5.0.0-SNAPSHOT
grailsVersion=7.0.0-SNAPSHOT
grailsGradlePluginVersion=7.0.0-M2
grailsVersion=7.0.0-M1
grailsGradlePluginVersion=7.0.0-SNAPSHOT
seleniumVersion=4.27.0
testcontainersVersion=1.20.4

Expand Down

0 comments on commit 7d17d17

Please sign in to comment.