-
Notifications
You must be signed in to change notification settings - Fork 4
Upgraded to Grails 7. New github actions. Removed travis builder. Cleanup #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"extends": [ | ||
"config:base" | ||
], | ||
"labels": ["type: dependency upgrade"], | ||
"packageRules": [ | ||
{ | ||
"matchUpdateTypes": ["major"], | ||
"enabled": false | ||
}, | ||
{ | ||
"matchPackagePatterns": ["*"], | ||
"allowedVersions": "!/SNAPSHOT$/" | ||
}, | ||
{ | ||
"matchPackagePatterns": [ | ||
"^org\\.codehaus\\.groovy" | ||
], | ||
"groupName": "groovy monorepo" | ||
}, | ||
{ | ||
"matchPackageNames": [ | ||
"org.grails:grails-bom", | ||
"org.grails:grails-bootstrap", | ||
"org.grails:grails-codecs", | ||
"org.grails:grails-console", | ||
"org.grails:grails-core", | ||
"org.grails:grails-databinding", | ||
"org.grails:grails-dependencies", | ||
"org.grails:grails-docs", | ||
"org.grails:grails-encoder", | ||
"org.grails:grails-gradle-model", | ||
"org.grails:grails-logging", | ||
"org.grails:grails-plugin-codecs", | ||
"org.grails:grails-plugin-controllers", | ||
"org.grails:grails-plugin-databinding", | ||
"org.grails:grails-plugin-datasource", | ||
"org.grails:grails-plugin-domain-class", | ||
"org.grails:grails-plugin-i18n", | ||
"org.grails:grails-plugin-interceptors", | ||
"org.grails:grails-plugin-mimetypes", | ||
"org.grails:grails-plugin-rest", | ||
"org.grails:grails-plugin-services", | ||
"org.grails:grails-plugin-url-mappings", | ||
"org.grails:grails-plugin-url-validation", | ||
"org.grails:grails-shell", | ||
"org.grails:grails-spring", | ||
"org.grails:grails-test", | ||
"org.grails:grails-validation", | ||
"org.grails:grails-web", | ||
"org.grails:grails-web-boot", | ||
"org.grails:grails-web-common", | ||
"org.grails:grails-web-databinding", | ||
"org.grails:grails-web-fileupload", | ||
"org.grails:grails-web-mvc", | ||
"org.grails:grails-web-url-mappings" | ||
Comment on lines
+23
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these valid for Grails 7? |
||
], | ||
"groupName": "grails monorepo" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: "Java CI" | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'grails_[0-9]+.x' | ||
pull_request: | ||
branches: | ||
- master | ||
- 'grails_[0-9]+.x' | ||
workflow_dispatch: | ||
jobs: | ||
publish_snapshot: | ||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | ||
name: "Build Project and Publish Snapshot release" | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: write # updates gh-pages branch | ||
packages: write # publishes snapshot to GitHub Packages | ||
steps: | ||
- name: "📥 Checkout repository" | ||
uses: actions/checkout@v4 | ||
- name: "☕️ Setup JDK" | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: liberica | ||
- name: "🐘 Setup Gradle" | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | ||
- name: "🔨 Build Project" | ||
run: ./gradlew build | ||
- name: "📤 Publish Snapshot version to Artifactory (repo.grails.org)" | ||
env: | ||
GRAILS_PUBLISH_RELEASE: 'false' | ||
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }} | ||
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }} | ||
MAVEN_PUBLISH_URL: 'https://repo.grails.org/artifactory/plugins3-snapshots-local' | ||
run: ./gradlew publish | ||
- name: "📖 Generate Snapshot Documentation" | ||
run: ./gradlew docs | ||
- name: "📤 Publish Snapshot Documentation to Github Pages" | ||
uses: apache/grails-github-actions/deploy-github-pages@asf | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GRADLE_PUBLISH_RELEASE: 'false' | ||
SOURCE_FOLDER: build/docs | ||
Comment on lines
+42
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Release Drafter" | ||
on: | ||
issues: | ||
types: [closed, reopened] | ||
push: | ||
branches: | ||
- master | ||
- 'grails_[0-9]+.x' | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
pull_request_target: | ||
types: [opened, reopened, synchronize] | ||
jobs: | ||
update_release_draft: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: "📝 Update Release Draft" | ||
uses: release-drafter/release-drafter@v6 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: [ published ] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
JAVA_VERSION: '17.0.15' # this must be a specific version for reproducible builds | ||
RELEASE_TAG_PREFIX: 'v' | ||
DOCUMENTATION: 'false' | ||
jobs: | ||
publish: | ||
permissions: | ||
packages: read # pre-release workflow | ||
contents: write # to create release | ||
issues: write # to modify milestones | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_version: ${{ steps.release_version.outputs.value }} | ||
extract_repository_name: ${{ steps.extract_repository_name.outputs.repository_name }} | ||
steps: | ||
- name: "📝 Store the current release version" | ||
id: release_version | ||
run: | | ||
export RELEASE_VERSION="${{ github.ref_name }}" | ||
export RELEASE_VERSION=${RELEASE_VERSION:${#RELEASE_TAG_PREFIX}} | ||
echo "Found Release Version: ${RELEASE_VERSION}" | ||
echo "value=${RELEASE_VERSION}" >> $GITHUB_OUTPUT | ||
- name: "Extract repository name" | ||
id: extract_repository_name | ||
run: | | ||
echo "repository_name=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT | ||
- name: "📥 Checkout the repository" | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ref: v${{ steps.release_version.outputs.value }} | ||
- name: 'Ensure Common Build Date' # to ensure a reproducible build | ||
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV" | ||
- name: "Ensure source files use common date" | ||
run: | | ||
find . -depth \( -type f -o -type d \) -exec touch -d "@${SOURCE_DATE_EPOCH}" {} + | ||
- name: "☕️ Setup JDK" | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: liberica | ||
java-version: ${{ env.JAVA_VERSION }} | ||
- name: "🐘 Setup Gradle" | ||
uses: gradle/actions/setup-gradle@v4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the |
||
- name: "⚙️ Run pre-release" | ||
uses: grails/github-actions/pre-release@asf | ||
env: | ||
RELEASE_VERSION: ${{ steps.release_version.outputs.value }} | ||
- name: "🔐 Generate key file for artifact signing" | ||
env: | ||
SECRING_FILE: ${{ secrets.SECRING_FILE }} | ||
run: | | ||
printf "%s" "$SECRING_FILE" | base64 -d > "${{ github.workspace }}/secring.gpg" | ||
- name: "🧩 Run Assemble" | ||
id: assemble | ||
run: | | ||
./gradlew -U assemble -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg -Psigning.keyId=${{ secrets.SIGNING_KEY }} | ||
env: | ||
GRAILS_PUBLISH_RELEASE: 'true' | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} | ||
- name: "📤 Publish to Maven Central" | ||
env: | ||
GRAILS_PUBLISH_RELEASE: 'true' | ||
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }} | ||
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }} | ||
NEXUS_PUBLISH_URL: 'https://ossrh-staging-api.central.sonatype.com/service/local/' | ||
NEXUS_PUBLISH_DESCRIPTION: '${{ steps.extract_repository_name.outputs.repository_name }}:${{ steps.release_version.outputs.value }}' | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} | ||
run: > | ||
./gradlew | ||
-Psigning.keyId=${{ secrets.SIGNING_KEY }} | ||
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg | ||
publishMavenPublicationToSonatypeRepository | ||
closeSonatypeStagingRepository | ||
- name: "Generate Build Date file" | ||
run: echo "$SOURCE_DATE_EPOCH" >> build/BUILD_DATE.txt | ||
- name: "Upload Build Date file" | ||
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 | ||
with: | ||
files: build/BUILD_DATE.txt | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
release: | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- name: "📥 Checkout repository" | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ref: v${{ needs.publish.outputs.release_version }} | ||
- name: "☕️ Setup JDK" | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: liberica | ||
java-version: ${{ env.JAVA_VERSION }} | ||
- name: "🐘 Setup Gradle" | ||
uses: gradle/actions/setup-gradle@v4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the |
||
- name: "📤 Release staging repository" | ||
env: | ||
GRAILS_PUBLISH_RELEASE: 'true' | ||
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }} | ||
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }} | ||
NEXUS_PUBLISH_URL: 'https://ossrh-staging-api.central.sonatype.com/service/local/' | ||
NEXUS_PUBLISH_DESCRIPTION: '${{ needs.publish.outputs.extract_repository_name }}:${{ needs.publish.outputs.release_version }}' | ||
run: > | ||
./gradlew | ||
findSonatypeStagingRepository | ||
releaseSonatypeStagingRepository | ||
- name: "📖 Generate Documentation" | ||
if: ${{ env.DOCUMENTATION != 'false' }} | ||
run: ./gradlew docs | ||
- name: "📤 Publish Documentation to Github Pages" | ||
if: ${{ env.DOCUMENTATION != 'false' }} | ||
uses: apache/grails-github-actions/deploy-github-pages@asf | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GRADLE_PUBLISH_RELEASE: 'true' | ||
SOURCE_FOLDER: build/docs | ||
VERSION: ${{ needs.publish.outputs.release_version }} | ||
Comment on lines
+121
to
+131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a |
||
- name: "⚙️ Run post-release" | ||
uses: apache/grails-github-actions/post-release@asf |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this valid for Grails 7?