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

Grails 7: Publishing for grails-spring-security-acl #47

Merged
merged 3 commits into from
Dec 2, 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
41 changes: 41 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name-template: $RESOLVED_VERSION
tag-template: v$RESOLVED_VERSION
categories:
- title: 🚀 Features
labels:
- "type: enhancement"
- "type: new feature"
- "type: major"
- title: 🚀 Bug Fixes/Improvements
labels:
- "type: improvement"
- "type: bug"
- "type: minor"
- title: 🛠 Dependency upgrades
labels:
- "type: dependency upgrade"
- "dependencies"
- title: ⚙️ Build/CI
labels:
- "type: ci"
- "type: build"
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
68 changes: 68 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"extends": [
"config:base"
],
"labels": ["type: dependency upgrade"],
"packageRules": [
{
"matchPackagePatterns": ["*"],
"allowedVersions": "!/SNAPSHOT$/"
},
{
"matchPackagePatterns": [
"^org\\.codehaus\\.groovy"
],
"groupName": "groovy monorepo"
},
{
"matchPackagePatterns": [
"^org\\.asciidoctor"
],
"groupName": "asciidoctor monorepo"
{
"matchPackagePatterns": [
"^org\\.spockframework"
],
"groupName": "spock framework 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"
}
]
}
48 changes: 48 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Changelog
on:
issues:
types: [closed,reopened]
push:
branches:
- '[5-9]+.[0-9]+.x'
workflow_dispatch:
jobs:
release_notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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 ::set-output name=has_release_drafter::${has_release_drafter}
- name: Extract branch name
id: extract_branch
run: echo ::set-output name=value::${GITHUB_REF:11}
# If it has release drafter:
- uses: release-drafter/[email protected]
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
commitish: ${{ steps.extract_branch.outputs.value }}
filter-by-commitish: true
# 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 }}
133 changes: 133 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Release
on:
release:
types: [published]
jobs:
publish:
outputs:
release_version: ${{ steps.release_version.outputs.value }}
runs-on: ubuntu-latest
env:
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: [email protected]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Set the current release version
id: release_version
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
- name: Run pre-release
uses: micronaut-projects/github-actions/pre-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Assemble
if: success()
id: assemble
uses: gradle/gradle-build-action@v2
with:
arguments: assemble
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Upload Distribution
if: success()
uses: actions/upload-artifact@v4
with:
name: spring-security-cas-${{ steps.release_version.outputs.value }}.jar
path: plugin/build/libs/spring-security-cas-${{ steps.release_version.outputs.value }}-plain.jar
- name: Generate secring file
env:
SECRING_FILE: ${{ secrets.SECRING_FILE }}
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
- name: Publish to Sonatype OSSRH
id: publish
uses: gradle/gradle-build-action@v2
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
with:
arguments: |
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
publishToSonatype
closeSonatypeStagingRepository
release:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
ref: v${{ needs.publish.outputs.release_version }}
- name: Nexus Staging Close And Release
uses: gradle/gradle-build-action@v2
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
with:
arguments: |
findSonatypeStagingRepository
releaseSonatypeStagingRepository
- name: Run post-release
if: success()
uses: micronaut-projects/github-actions/post-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
env:
SNAPSHOT_SUFFIX: -SNAPSHOT
docs:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
ref: v${{ needs.publish.outputs.release_version }}
- name: Build Documentation
id: docs
uses: gradle/gradle-build-action@v2
with:
arguments: docs:docs
- name: Publish to Github Pages
if: success()
uses: grails/github-pages-deploy-action@v2
env:
SKIP_LATEST: ${{ contains(needs.publish.outputs.release_version, 'M') }}
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs
DOC_FOLDER: gh-pages
COMMIT_EMAIL: [email protected]
COMMIT_NAME: Puneet Behl
VERSION: ${{ needs.publish.outputs.release_version }}
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
plugins {
id 'groovy'
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

subprojects {
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
Expand Down
8 changes: 0 additions & 8 deletions functional-test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:5.0.1"
classpath "org.grails.plugins:hibernate5:$gormVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:3.2"
}
Expand All @@ -19,7 +18,6 @@ apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"com.github.erdi.webdriver-binaries"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.grails-gsp"

repositories {
Expand Down Expand Up @@ -49,7 +47,6 @@ dependencies {
implementation "org.grails.plugins:gsp"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:5.0.1"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "com.h2database:h2"
testImplementation "org.grails:grails-gorm-testing-support"
Expand Down Expand Up @@ -81,8 +78,3 @@ tasks.withType(Test) {
exceptionFormat 'full'
}
}

assets {
minifyJs = true
minifyCss = true
}
10 changes: 7 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
projectVersion=5.0.0-SNAPSHOT
grailsVersion=7.0.0-SNAPSHOT
gormVersion=9.0.0-SNAPSHOT
vcsUrl=https://github.com/grails-plugins/grails-spring-security-acl
springSecurityVersion=6.3.3
springSecurityVersion=6.3.4
springSecurityCoreVersion=7.0.0-SNAPSHOT
jakartaServletApiVersion=6.0.0
micronautVersion=4.5.3
hibernateCoreVersion=5.6.15.Final
ehcacheVersion=3.10.8
seleniumVersion=4.26.0
projectDesc=Adds Spring Security ACL support to a Grails application.
developers=Burt Beckwith
websiteUrl=http://grails-plugins.github.io/grails-spring-security-acl/
issueTrackerUrl=https://github.com/grails-plugins/grails-spring-security-acl/issues
vcsUrl=https://github.com/grails-plugins/grails-spring-security-acl
githubSlug=grails-plugins/grails-spring-security-acl
Loading
Loading