Skip to content
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

fix(build)!: Upgrade to Grails 6 #125

Merged
merged 7 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name-template: $RESOLVED_VERSION
tag-template: v$RESOLVED_VERSION
pull-request:
title-templates:
fix: '🐛 $TITLE (#$NUMBER)'
feat: '🚀 $TITLE (#$NUMBER)'
default: '$TITLE (#$NUMBER)'
autolabeler:
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'improvement'
branch:
- '/improv\/.+/'
title:
- '/improv/i'
- label: 'feature'
branch:
- '/feature\/.+/'
title:
- '/feat/i'
- label: 'documentation'
branch:
- '/docs\/.+/'
title:
- '/docs/i'
- label: 'maintenance'
branch:
- '/(chore|refactor|style|test|ci|perf|build)\/.+/'
title:
- '/(chore|refactor|style|test|ci|perf|build)/i'
- label: 'chore'
branch:
- '/chore\/.+/'
title:
- '/chore/i'
- label: 'refactor'
branch:
- '/refactor\/.+/'
title:
- '/refactor/i'
- label: 'style'
branch:
- '/style\/.+/'
title:
- '/style/i'
- label: 'test'
branch:
- '/test\/.+/'
title:
- '/test/i'
- label: 'ci'
branch:
- '/ci\/.+/'
title:
- '/ci/i'
- label: 'perf'
branch:
- '/perf\/.+/'
title:
- '/perf/i'
- label: 'build'
branch:
- '/build\/.+/'
title:
- '/build/i'
- label: 'deps'
branch:
- '/deps\/.+/'
title:
- '/deps/i'
- label: 'revert'
branch:
- '/revert\/.+/'
title:
- '/revert/i'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- "type: enhancement"
- "type: new feature"
- "type: major"
- "type: minor"
- title: '💡 Improvements'
labels:
- 'improvement'
- "type: improvement"

- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bug'
- "type: bug"
- title: '📚 Documentation'
labels:
- 'docs'
- title: '🔧 Maintenance'
labels:
- 'maintenance'
- 'chore'
- 'refactor'
- 'style'
- 'test'
- 'ci'
- 'perf'
- 'build'
- "type: ci"
- "type: build"
- title: '⏪ Reverts'
labels:
- 'revert'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
version-resolver:
major:
labels:
- 'type: major'
minor:
labels:
- 'type: minor'
patch:
labels:
- 'type: patch'
default: patch
template: |
## What's Changed

$CHANGES

## Contributors

$CONTRIBUTORS
61 changes: 61 additions & 0 deletions .github/renovate.json
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"
],
"groupName": "grails monorepo"
}
]
}
83 changes: 83 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Java CI
on:
push:
branches:
- '[3-9]+.[0-9]+.x'
pull_request:
branches:
- '[3-9]+.[0-9]+.x'
env:
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: [email protected]

jobs:

test_project:
name: Test Project
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
java: [11, 17]

steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- uses: gradle/actions/setup-gradle@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: check

publish_snapshot:
name: Build Project and Publish Snapshot release
runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with: { java-version: 11, distribution: temurin }

- name: Build Project
uses: gradle/actions/setup-gradle@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: build

- name: Publish Snapshot version to Artifactory (repo.grails.org)
if: success()
uses: gradle/actions/setup-gradle@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
ORG_GRADLE_PROJECT_artifactoryPublishUsername: ${{ secrets.ARTIFACTORY_USERNAME }}
ORG_GRADLE_PROJECT_artifactoryPublishPassword: ${{ secrets.ARTIFACTORY_PASSWORD }}
with:
arguments: |
-Dorg.gradle.internal.publish.checksums.insecure=true
publish

- name: Generate Snapshot Documentation
if: success()
uses: gradle/actions/setup-gradle@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: docs

- name: Publish Snapshot Documentation to Github Pages
if: success()
uses: micronaut-projects/github-pages-deploy-action@grails
env:
BRANCH: gh-pages
COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }}
COMMIT_NAME: ${{ env.GIT_USER_NAME }}
FOLDER: build/docs/manual
GH_TOKEN: ${{ secrets.GH_TOKEN }}
51 changes: 51 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Changelog
on:
issues:
types: [closed,reopened]
push:
branches:
- '[3-9]+.[0-9]+.x'
pull_request:
types: [opened, reopened, synchronize, labeled]
pull_request_target:
types: [opened, reopened, synchronize, labeled]
workflow_dispatch:
jobs:
release_notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check if it has release drafter config file
id: check_release_drafter
run: |
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
echo "has_release_drafter=${has_release_drafter}" >> $GITHUB_OUTPUT
- name: Extract branch name
id: extract_branch
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
# If it has release drafter:
- uses: release-drafter/release-drafter@v5
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
commitish: ${{ steps.extract_branch.outputs.value }}
# Otherwise:
- name: Export Gradle Properties
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
uses: micronaut-projects/github-actions/export-gradle-properties@master
- uses: micronaut-projects/github-actions/release-notes@master
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
id: release_notes
with:
token: ${{ secrets.GH_TOKEN }}
- uses: ncipollo/release-action@v1
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
with:
allowUpdates: true
commit: ${{ steps.release_notes.outputs.current_branch }}
draft: true
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
tag: v${{ steps.release_notes.outputs.next_version }}
bodyFile: CHANGELOG.md
token: ${{ secrets.GH_TOKEN }}
Loading
Loading