Skip to content

Commit

Permalink
Merge branch 'grails:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jhron committed May 13, 2021
2 parents 71b8faa + 1d5f9fb commit c397385
Show file tree
Hide file tree
Showing 23 changed files with 384 additions and 285 deletions.
26 changes: 26 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name-template: $NEXT_PATCH_VERSION
tag-template: v$NEXT_PATCH_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"
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
## Changes
$CHANGES
## Contributors
$CONTRIBUTORS
26 changes: 26 additions & 0 deletions .github/workflows/central-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Maven Central Sync
on:
workflow_dispatch:
inputs:
release_version:
description: 'Release version (eg: 1.2.3)'
required: true
jobs:
central-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: v${{ github.event.inputs.release_version }}
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Syncs with Maven Central/Sonatype
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
run: |
./gradlew synchronizeWithMavenCentral --no-daemon
87 changes: 87 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Java CI
on:
push:
branches:
- master
- '[7-9]+.[0-9]+.x'
pull_request:
branches:
- master
- '[7-9]+.[0-9]+.x'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '11', '14']
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Optional setup step
run: |
[ -f ./setup.sh ] && ./setup.sh || true
- name: Run Tests
run: |
./gradlew --no-daemon --refresh-dependencies clean check
- name: Publish Test Report
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Run Assemble
if: success() && github.event_name == 'push' && matrix.java == '8'
run: ./gradlew assemble
- name: Publish to repo.grails.org
if: success() && github.event_name == 'push' && matrix.java == '8'
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: |
./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish
- name: Extract branch name
if: success() && github.event_name == 'push' && matrix.java == '8'
id: extract_branch
run: echo ::set-output name=value::${GITHUB_REF:11}
- name: Create Snapshot Message for the Workflow Dispatch
if: success() && github.event_name == 'push' && matrix.java == '8'
id: dispatch_message
run: echo ::set-output name=value::{\"message\":\"New Core Snapshot $(date) - $GITHUB_SHA\"}
- name: Invoke the Java CI workflow in GORM Hibernate5
if: success() && github.event_name == 'push' && matrix.java == '8'
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/gorm-hibernate5
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.dispatch_message.outputs.value }}
- name: Invoke the Java CI workflow in GORM MongoDB
if: success() && github.event_name == 'push' && matrix.java == '8'
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/gorm-mongodb
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.dispatch_message.outputs.value }}
- name: Invoke the Java CI workflow in GORM Neo4j
if: success() && github.event_name == 'push' && matrix.java == '8'
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/gorm-neo4j
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.dispatch_message.outputs.value }}
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:
- master
- '[7-9]+.[0-9]+.x'
jobs:
release_notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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}
# 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:
prerelease: true
name: 7.1.0.RC1
tag: v7.1.0.RC1
version: 7.1.0.RC1
# 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 }}
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
env:
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: [email protected]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Extract Target Branch
id: extract_branch
run: |
echo "Determining Target Branch"
TARGET_BRANCH=`cat $GITHUB_EVENT_PATH | jq '.release.target_commitish' | sed -e 's/^"\(.*\)"$/\1/g'`
echo $TARGET_BRANCH
echo ::set-output name=value::${TARGET_BRANCH}
- name: Set the current release version
id: release_version
run: echo ::set-output name=release_version::${GITHUB_REF:11}
- name: Run pre-release
uses: micronaut-projects/github-actions/pre-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Sonatype OSSRH
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
run: |
echo $SECRING_FILE | base64 -d > secring.gpg
echo "Publishing Artifacts"
(set -x; ./gradlew -Psigning.secretKeyRingFile="${GITHUB_WORKSPACE}/secring.gpg" publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon)
(set -x; ./gradlew assemble --no-daemon)
- name: Export Gradle Properties
uses: micronaut-projects/github-actions/export-gradle-properties@master
- name: Run post-release
if: success()
uses: micronaut-projects/github-actions/post-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
env:
SNAPSHOT_SUFFIX: .BUILD-SNAPSHOT
- name: Create Message for the GORM Documentation Release
if: success()
id: gorm_docs_release_message
run: |
echo ::set-output name=value::{\"gorm_version\":\"$RELEASE_VERSION\"}
env:
RELEASE_VERSION: ${{ steps.release_version.outputs.release_version }}
- name: Invoke gorm-docs release workflow
if: success()
id: gorm_docs
uses: benc-uk/[email protected]
with:
workflow: Release
repo: grails/gorm-docs
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.gorm_docs_release_message.outputs.value }}
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ cache:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
language: groovy
branches:
only:
- 6.1.x
jdk:
- openjdk8
- openjdk11
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[![Build Status](https://travis-ci.org/grails/grails-data-mapping.svg?branch=master)](https://travis-ci.org/grails/grails-data-mapping)
![Java CI](https://github.com/grails/grails-data-mapping/workflows/Java%20CI/badge.svg?branch=master)
![Release](https://github.com/grails/grails-data-mapping/workflows/Release/badge.svg?branch=master)
![Maven Central Sync](https://github.com/grails/grails-data-mapping/workflows/Maven%20Central%20Sync/badge.svg?branch=master)

GORM (Grails Object Mapping)
===
Expand Down
Loading

0 comments on commit c397385

Please sign in to comment.