Skip to content

Commit 91bf791

Browse files
committed
Copy Github workflow from master
1 parent 8875f96 commit 91bf791

File tree

7 files changed

+303
-2
lines changed

7 files changed

+303
-2
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gradle
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
target-branch: 7.0.x
9+
labels:
10+
- "type: dependency-upgrade"
11+
- package-ecosystem: gradle
12+
directory: "/"
13+
schedule:
14+
interval: daily
15+
open-pull-requests-limit: 10
16+
target-branch: master
17+
labels:
18+
- "type: dependency-upgrade"

.github/release-drafter.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name-template: $NEXT_PATCH_VERSION
2+
tag-template: v$NEXT_PATCH_VERSION
3+
categories:
4+
- title: 🚀 Features
5+
labels:
6+
- "type: enhancement"
7+
- "type: new feature"
8+
- "type: major"
9+
- title: 🚀 Bug Fixes/Improvements
10+
labels:
11+
- "type: improvement"
12+
- "type: bug"
13+
- "type: minor"
14+
- title: 🛠 Dependency upgrades
15+
labels:
16+
- "type: dependency-upgrade"
17+
- "dependencies"
18+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
19+
template: |
20+
## Changes
21+
22+
$CHANGES
23+
24+
## Contributors
25+
26+
$CONTRIBUTORS

.github/workflows/central-sync.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Maven Central Sync
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
release_version:
6+
description: 'Release version (eg: 1.2.3)'
7+
required: true
8+
jobs:
9+
central-sync:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
with:
15+
ref: v${{ github.event.inputs.release_version }}
16+
- uses: gradle/wrapper-validation-action@v1
17+
- name: Set up JDK
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
- name: Syncs with Maven Central/Sonatype
22+
env:
23+
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
24+
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
25+
run: |
26+
./gradlew synchronizeWithMavenCentral --no-daemon

.github/workflows/gradle.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Java CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- '[6-9]+.[1-9]+.x'
7+
pull_request:
8+
branches:
9+
- master
10+
- '[6-9]+.[1-9]+.x'
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
java: ['7']
17+
env:
18+
WORKSPACE: ${{ github.workspace }}
19+
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: actions/cache@v2
23+
with:
24+
path: ~/.gradle/caches
25+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
26+
restore-keys: |
27+
${{ runner.os }}-gradle-
28+
- name: Set up JDK
29+
uses: actions/setup-java@v1
30+
with:
31+
java-version: ${{ matrix.java }}
32+
- name: Optional setup step
33+
run: |
34+
[ -f ./setup.sh ] && ./setup.sh || true
35+
- name: Run Tests
36+
run: |
37+
./gradlew --no-daemon --refresh-dependencies clean check
38+
- name: Publish Test Report
39+
uses: scacap/action-surefire-report@v1
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
report_paths: '**/build/test-results/test/TEST-*.xml'
43+
- name: Run Assemble
44+
if: success() && github.event_name == 'push' && matrix.java == '7'
45+
run: ./gradlew assemble
46+
- name: Publish to repo.grails.org
47+
if: success() && github.event_name == 'push' && matrix.java == '7'
48+
env:
49+
SECRING_FILE: ${{ secrets.SECRING_FILE }}
50+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
51+
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
52+
GRAILS_CENTRAL_USERNAME: ${{ secrets.GRAILS_CENTRAL_USERNAME }}
53+
GRAILS_CENTRAL_PASSWORD: ${{ secrets.GRAILS_CENTRAL_PASSWORD }}
54+
run: |
55+
echo $SECRING_FILE | base64 -d > secring.gpg
56+
./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="secring.gpg" publish
57+
- name: Extract branch name
58+
if: success() && github.event_name == 'push' && matrix.java == '7'
59+
id: extract_branch
60+
run: echo ::set-output name=value::${GITHUB_REF:11}
61+
- name: Create Snapshot Message for the Workflow Dispatch
62+
if: success() && github.event_name == 'push' && matrix.java == '7'
63+
id: dispatch_message
64+
run: echo ::set-output name=value::{\"message\":\"New Core Snapshot $(date) - $GITHUB_SHA\"}
65+
- name: Invoke the Java CI workflow in GORM Hibernate5
66+
if: success() && github.event_name == 'push' && matrix.java == '7'
67+
uses: benc-uk/[email protected]
68+
with:
69+
workflow: Java CI
70+
repo: grails/gorm-hibernate5
71+
ref: ${{ steps.extract_branch.outputs.value }}
72+
token: ${{ secrets.GH_TOKEN }}
73+
inputs: ${{ steps.dispatch_message.outputs.value }}
74+
- name: Invoke the Java CI workflow in GORM MongoDB
75+
if: success() && github.event_name == 'push' && matrix.java == '7'
76+
uses: benc-uk/[email protected]
77+
with:
78+
workflow: Java CI
79+
repo: grails/gorm-mongodb
80+
ref: ${{ steps.extract_branch.outputs.value }}
81+
token: ${{ secrets.GH_TOKEN }}
82+
inputs: ${{ steps.dispatch_message.outputs.value }}
83+
- name: Invoke the Java CI workflow in GORM Neo4j
84+
if: success() && github.event_name == 'push' && matrix.java == '7'
85+
uses: benc-uk/[email protected]
86+
with:
87+
workflow: Java CI
88+
repo: grails/gorm-neo4j
89+
ref: ${{ steps.extract_branch.outputs.value }}
90+
token: ${{ secrets.GH_TOKEN }}
91+
inputs: ${{ steps.dispatch_message.outputs.value }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Changelog
2+
on:
3+
issues:
4+
types: [closed,reopened]
5+
push:
6+
branches:
7+
- master
8+
- '[6-9]+.[1-9]+.x'
9+
jobs:
10+
release_notes:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Check if it has release drafter config file
15+
id: check_release_drafter
16+
run: |
17+
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
18+
echo ::set-output name=has_release_drafter::${has_release_drafter}
19+
20+
# If it has release drafter:
21+
- uses: release-drafter/release-drafter@v5
22+
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
25+
with:
26+
prerelease: false
27+
name: 6.1.13
28+
tag: v6.1.13
29+
version: 6.1.13
30+
# Otherwise:
31+
- name: Export Gradle Properties
32+
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
33+
uses: micronaut-projects/github-actions/export-gradle-properties@master
34+
- uses: micronaut-projects/github-actions/release-notes@master
35+
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
36+
id: release_notes
37+
with:
38+
token: ${{ secrets.GH_TOKEN }}
39+
- uses: ncipollo/release-action@v1
40+
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
41+
with:
42+
allowUpdates: true
43+
commit: ${{ steps.release_notes.outputs.current_branch }}
44+
draft: true
45+
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
46+
tag: v${{ steps.release_notes.outputs.next_version }}
47+
bodyFile: CHANGELOG.md
48+
token: ${{ secrets.GH_TOKEN }}

.github/workflows/release.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
java: ['7']
11+
env:
12+
GIT_USER_NAME: puneetbehl
13+
GIT_USER_EMAIL: [email protected]
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
with:
18+
token: ${{ secrets.GH_TOKEN }}
19+
- uses: gradle/wrapper-validation-action@v1
20+
- name: Set up JDK
21+
uses: actions/setup-java@v1
22+
with:
23+
java-version: ${{ matrix.java }}
24+
- name: Extract Target Branch
25+
id: extract_branch
26+
run: |
27+
echo "Determining Target Branch"
28+
TARGET_BRANCH=`cat $GITHUB_EVENT_PATH | jq '.release.target_commitish' | sed -e 's/^"\(.*\)"$/\1/g'`
29+
echo $TARGET_BRANCH
30+
echo ::set-output name=value::${TARGET_BRANCH}
31+
- name: Set the current release version
32+
id: release_version
33+
run: echo ::set-output name=release_version::${GITHUB_REF:11}
34+
- name: Run pre-release
35+
uses: micronaut-projects/github-actions/pre-release@master
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
- name: Publish, Upload to Bintray
39+
env:
40+
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
41+
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
42+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
43+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
44+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
45+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
46+
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
47+
run: |
48+
echo "Publishing Artifacts"
49+
(set -x; ./gradlew bintrayUpload --no-daemon)
50+
(set -x; ./gradlew assemble --no-daemon)
51+
- name: Export Gradle Properties
52+
uses: micronaut-projects/github-actions/export-gradle-properties@master
53+
- name: Run post-release
54+
if: success()
55+
uses: micronaut-projects/github-actions/post-release@master
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
env:
59+
SNAPSHOT_SUFFIX: .BUILD-SNAPSHOT
60+
- name: Create Message for the GORM Documentation Release
61+
if: success()
62+
id: gorm_docs_release_message
63+
run: |
64+
echo ::set-output name=value::{\"gorm_version\":\"$RELEASE_VERSION\"}
65+
env:
66+
RELEASE_VERSION: ${{ steps.release_version.outputs.release_version }}
67+
- name: Invoke gorm-docs release workflow
68+
if: success()
69+
id: gorm_docs
70+
uses: benc-uk/[email protected]
71+
with:
72+
workflow: Release
73+
repo: grails/gorm-docs
74+
ref: ${{ steps.extract_branch.outputs.value }}
75+
token: ${{ secrets.GH_TOKEN }}
76+
inputs: ${{ steps.gorm_docs_release_message.outputs.value }}
77+
- name: Create Message for the Maven Central Sync
78+
if: success()
79+
id: maven_sync_message
80+
run: |
81+
echo ::set-output name=value::{\"release_version\":\"$RELEASE_VERSION\"}
82+
env:
83+
RELEASE_VERSION: ${{ steps.release_version.outputs.release_version }}
84+
- name: Invoke the Maven Central Sync workflow
85+
if: success()
86+
uses: benc-uk/[email protected]
87+
with:
88+
workflow: Maven Central Sync
89+
ref: ${{ steps.extract_branch.outputs.value }}
90+
token: ${{ secrets.GH_TOKEN }}
91+
inputs: ${{ steps.maven_sync_message.outputs.value }}

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ sudo: false
22
cache:
33
directories:
44
- "$HOME/.gradle"
5+
branches:
6+
only:
7+
- 6.0.x
58
language: groovy
69
jdk:
710
- openjdk7
@@ -26,8 +29,6 @@ env:
2629
- secure: U5U+rh3TugxMuTkpetfBj28f6uACKjD88jsQR5cd0B7gV5j0RAkq3skFpHu1F43y/RmofRcAqeSsYVT8+qRCEBDZjYBwTnT5+N+ItBzGNpv486oEyIhMUCr9bpfibfHz+1uqlPBFF9E+5X2lT5hSIXyIiBa+l/LpwhHsb0wSzH0=
2730
- secure: V7Dwj9pqJWmjeYJYWHdNGlujNhFwvEc5YbTv5AO9Xn+iUgaaQEmrv43a5I+4m+EGVraD3Pg6ENPBEc7e0/cD7GoocQ0uXwGkfe+dJISvp3s18lDMm7EtdxmTkiKVH5sgsHnGbbEHV4Ku1c9k1u4DKEjmPzfpoNr/vI2yKU9I5EM=
2831
- secure: XXFQBgzpIYV8boZo/ZeEq300zDLrWzD09vSTh3A9BvPsTTJgGlPBF008zFP2WD2XacBHbCFMPd0hPrO25SSCwX4P8C/PhhRRkrhuYaM1OeYzi6Xxbtnc1gpdUdxm9Z/cZlvLTEKL3cq+9XqbKOkcumM9pxY1mWkoeLVuv/9dsXw=
29-
before_install:
30-
3132
before_install:
3233
# Workaround for https://github.com/gradle/gradle/issues/2421:
3334
# download all Gradle distributions with openjdk8

0 commit comments

Comments
 (0)