Skip to content
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
60 changes: 60 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "Java CI"
on:
push:
branches:
- '[0-9]+.[0-9]+.x'
pull_request:
branches:
- '[0-9]+.[0-9]+.x'
workflow_dispatch:
env:
GRAILS_PUBLISH_RELEASE: 'false'
JAVA_DISTRIBUTION: liberica
JAVA_VERSION: 17.0.17
jobs:
test_project:
name: "Test Project"
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-24.04
steps:
- name: "📥 Checkout repository"
uses: actions/checkout@v5
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v5
- name: "🏃‍♂️ Run Tests"
run: ./gradlew check --continue
publish_snapshot:
name: "Build Project and Publish Snapshot"
runs-on: ubuntu-24.04
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.repository_owner == 'grails-plugins'
permissions:
contents: write
steps:
- name: "📥 Checkout repository"
uses: actions/checkout@v5
- name: "☕️ Setup JDK"
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v5
- name: "📤 Publish Snapshot artifacts"
env:
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 to Github Pages"
uses: apache/grails-github-actions/deploy-github-pages@asf
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GRADLE_PUBLISH_RELEASE: 'false'
SOURCE_FOLDER: plugin/build/docs
115 changes: 115 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Release
on:
release:
types: [ published ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GRAILS_PUBLISH_RELEASE: 'true'
JAVA_DISTRIBUTION: liberica
JAVA_VERSION: 17.0.17 # this must be a specific version for reproducible builds, keep in sync with .sdkmanrc
REPO_NAME: ${{ github.event.repository.name }}
TAG: ${{ github.event.release.tag_name }}
VERSION: will be computed in each job
jobs:
publish:
name: "Create and Stage Release Artifacts"
permissions:
contents: write # to add distribution to the GitHub release page
issues: write # to modify milestones
runs-on: ubuntu-24.04
steps:
- name: "📝 Establish release version"
run: |
echo "Release version: ${TAG#v}"
echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
- name: "📥 Checkout the repository"
uses: actions/checkout@v5
with:
ref: ${{ env.TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: "📅 Store 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@v5
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v5
- name: "⚙️ Run pre-release"
uses: grails/github-actions/pre-release@asf
env:
RELEASE_VERSION: ${{ env.VERSION }}
- 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: "📤 Publish to Maven Central"
env:
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: '${{ env.REPO_NAME }}:${{ env.VERSION }}'
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
run: >
./gradlew
-Psigning.keyId=${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@v2
with:
tag_name: ${{ env.TAG }}
files: build/BUILD_DATE.txt
release:
name: "Release Staging Repository, Publish Docs and Run Post-Release"
needs: publish
runs-on: ubuntu-24.04
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: "📝 Establish release version"
run: |
echo "Release version: ${TAG#v}"
echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
- name: "📥 Checkout repository"
uses: actions/checkout@v5
with:
ref: ${{ env.TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: "☕️ Setup JDK"
uses: actions/setup-java@v5
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v5
- name: "📤 Release staging repository"
env:
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: '${{ env.REPO_NAME }}:${{ env.VERSION }}'
run: >
./gradlew
findSonatypeStagingRepository
releaseSonatypeStagingRepository
- name: "📖 Generate Documentation"
run: ./gradlew docs
- name: "📤 Publish Documentation to Github Pages"
uses: apache/grails-github-actions/deploy-github-pages@asf
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GRADLE_PUBLISH_RELEASE: 'true'
SOURCE_FOLDER: plugin/build/docs
- name: "⚙️ Run post-release"
uses: apache/grails-github-actions/post-release@asf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ out/
.project
.settings
.classpath
!buildSrc/src/main/groovy/build
1 change: 1 addition & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java=17.0.17-librca
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apache License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## Docs
# 🧩 Grails Logical Delete Plugin

[![Maven Central](https://img.shields.io/maven-central/v/org.grails.plugins/grails-logical-delete.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/org.grails.plugins/grails-logical-delete)
[![Java CI](https://github.com/grails-plugins/grails-logical-delete/actions/workflows/gradle.yml/badge.svg?event=push)](https://github.com/grails-plugins/grails-logical-delete/actions/workflows/gradle.yml)

The **Grails Logical Delete** plugin provides a simple way to implement logical deletion (soft delete)
of domain class instances in Grails applications.

Instead of permanently removing records from the database, the plugin marks them as deleted,
allowing you to preserve data integrity, maintain audit history, and safely “undelete” entities when needed.

## ✨ Features

- **Transparent soft-deletes** — automatically updates a flag instead of issuing DELETE statements.
- **Query filtering** — excludes logically deleted records from queries by default.
- **Undelete support** — easily restore logically deleted records.

## 📚 Documentation

[Latest release](https://grails-plugins.github.io/grails-logical-delete/latest/) | [Latest snapshot](https://grails-plugins.github.io/grails-logical-delete/snapshot/)

See [grails-plugins.github.io/gorm-logical-delete/](https://grails-plugins.github.io/gorm-logical-delete/).
Loading