Skip to content

Commit b5cc40e

Browse files
[core] Update common files for branch master (micronaut-projects#3564)
Co-authored-by: Alvaro Sanchez-Mariscal <alvaro.sanchezmariscal@gmail.com> Co-authored-by: Álvaro Sánchez-Mariscal <alvarosanchez@users.noreply.github.com>
1 parent 5bda6b5 commit b5cc40e

File tree

2,827 files changed

+4759
-3618
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,827 files changed

+4759
-3618
lines changed

.github/workflows/central-sync.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# WARNING: Do not edit this file directly. Instead, go to:
2+
#
3+
# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows
4+
#
5+
# and edit them there. Note that it will be sync'ed to all the Micronaut repos
6+
name: Maven Central Sync
7+
on:
8+
release:
9+
types: [published]
10+
jobs:
11+
central-sync:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
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: Set the current release version
22+
id: release_version
23+
run: |
24+
release_version=${GITHUB_REF:11}
25+
sed -i "s/^projectVersion.*$/projectVersion\=${release_version}/" gradle.properties
26+
echo ::set-output name=release_version::${release_version}
27+
- name: Publish to Sonatype OSSRH
28+
env:
29+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
30+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
31+
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
32+
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
33+
GPG_FILE: ${{ secrets.GPG_FILE }}
34+
PUBLISH_IN_2_STEPS: ${{ secrets.PUBLISH_IN_2_STEPS }}
35+
run: |
36+
echo $GPG_FILE | base64 -d > secring.gpg
37+
if [ -z ${PUBLISH_IN_2_STEPS+x} ]; then
38+
./gradlew publish closeAndReleaseRepository
39+
else
40+
./gradlew publish && ./gradlew closeAndReleaseRepository
41+
fi
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# WARNING: Do not edit this file directly. Instead, go to:
2+
#
3+
# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows
4+
#
5+
# and edit them there. Note that it will be sync'ed to all the Micronaut repos
6+
name: Check Dependencies
7+
on:
8+
schedule:
9+
- cron: '0 16 * * MON-FRI'
10+
jobs:
11+
check-dependencies:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/cache@v1
16+
with:
17+
path: ~/.gradle/caches
18+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
19+
restore-keys: |
20+
${{ runner.os }}-gradle-
21+
- name: Set up JDK
22+
uses: actions/setup-java@v1
23+
with:
24+
java-version: 1.8
25+
- name: Check Dependencies
26+
run: ./gradlew dependencyUpdates
27+
- name: Google Chat Notification
28+
if: failure()
29+
uses: Co-qn/google-chat-notification@releases/v1
30+
with:
31+
name: Check Dependencies
32+
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
33+
status: ${{ job.status }}
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# WARNING: Do not edit this file directly. Instead, go to:
2+
#
3+
# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows
4+
#
5+
# and edit them there. Note that it will be sync'ed to all the Micronaut repos
6+
name: Update Dependencies
7+
on:
8+
schedule:
9+
- cron: '0 4 * * MON-FRI'
10+
jobs:
11+
dependency-updates:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/cache@v1
16+
with:
17+
path: ~/.gradle/caches
18+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
19+
restore-keys: |
20+
${{ runner.os }}-gradle-
21+
- name: Set up JDK
22+
uses: actions/setup-java@v1
23+
with:
24+
java-version: 1.8
25+
- name: Export Gradle Properties
26+
uses: micronaut-projects/github-actions/export-gradle-properties@master
27+
- name: Check Dependencies
28+
run: ./gradlew useLatestVersions
29+
- name: Create Pull Request
30+
uses: peter-evans/create-pull-request@v2
31+
with:
32+
token: ${{ secrets.GH_TOKEN }}
33+
committer: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}>
34+
author: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}>
35+
commit-message: Update dependencies
36+
title: 'Dependency upgrades'
37+
body: Upgrades dependencies to their latest versions
38+
labels: "type: dependency-upgrade"
39+
base: ${{ env.githubBranch }}
40+
branch: dependency-updates

.github/workflows/gradle.yml

+54-41
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,70 @@
1+
# WARNING: Do not edit this file directly. Instead, go to:
2+
#
3+
# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows
4+
#
5+
# and edit them there. Note that it will be sync'ed to all the Micronaut repos
16
name: Java CI
27
on:
38
push:
49
branches:
510
- '*'
11+
# - master
12+
# - '[1-9]+.[0-9]+.x'
613
pull_request:
714
branches:
8-
- master
15+
- master
16+
- '[1-9]+.[0-9]+.x'
917
jobs:
1018
build:
19+
if: github.repository != 'micronaut-projects/micronaut-project-template'
1120
runs-on: ubuntu-latest
1221
strategy:
1322
matrix:
1423
java: ['8', '11', '14']
1524
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/cache@v1
18-
with:
19-
path: ~/.gradle/caches
20-
key: ${{ runner.os }}-micronaut-core-gradle-${{ hashFiles('**/*.gradle') }}
21-
restore-keys: |
22-
${{ runner.os }}-micronaut-core-gradle-
23-
- uses: actions/cache@v1
24-
with:
25-
path: ~/.gradle/wrapper
26-
key: ${{ runner.os }}-micronaut-core-wrapper-${{ hashFiles('**/*.gradle') }}
27-
restore-keys: |
28-
${{ runner.os }}-micronaut-core-wrapper-
29-
- name: Set up JDK
30-
uses: actions/setup-java@v1
31-
with:
32-
java-version: ${{ matrix.java }}
33-
- name: Build with Gradle
34-
run: |
35-
./gradlew pTML
36-
./gradlew check --no-daemon --parallel --continue
37-
- name: Publish Test Report
38-
if: failure()
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: Publish to JFrog OSS
44-
if: success() && github.event_name == 'push' && matrix.java == '8' && github.ref == 'refs/heads/master'
45-
env:
25+
- uses: actions/checkout@v2
26+
- uses: actions/cache@v1
27+
with:
28+
path: ~/.gradle/caches
29+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
30+
restore-keys: |
31+
${{ runner.os }}-gradle-
32+
- name: Set up JDK
33+
uses: actions/setup-java@v1
34+
with:
35+
java-version: ${{ matrix.java }}
36+
- name: Optional setup step
37+
run: |
38+
[ -f ./setup.sh ] && ./setup.sh || true
39+
- name: Build with Gradle
40+
run: ./gradlew dependencyUpdates check --parallel --continue
41+
env:
42+
TESTCONTAINERS_RYUK_DISABLED: true
43+
- name: Publish Test Report
44+
if: failure()
45+
uses: scacap/action-surefire-report@v1
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
report_paths: '**/build/test-results/test/TEST-*.xml'
49+
- name: Publish to JFrog OSS
50+
if: success() && github.event_name == 'push' && matrix.java == '8' && github.ref == 'refs/heads/master'
51+
env:
4652
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
4753
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
48-
run: ./gradlew publish docs --no-daemon
49-
- name: Publish to Github Pages
50-
if: success() && github.event_name == 'push' && matrix.java == '8' && github.ref == 'refs/heads/master'
51-
uses: micronaut-projects/micronaut-docs-deploy@master
52-
env:
53-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
54-
GH_REPOSITORY: micronaut-projects/micronaut-docs
55-
BASE_BRANCH: master
56-
BRANCH: gh-pages
57-
FOLDER: build/docs
54+
run: ./gradlew publish docs --no-daemon
55+
- name: Determine docs target repository
56+
uses: haya14busa/action-cond@v1
57+
id: docs_target
58+
with:
59+
cond: ${{ github.repository == 'micronaut-projects/micronaut-core' }}
60+
if_true: "micronaut-projects/micronaut-docs"
61+
if_false: ${{ github.repository }}
62+
- name: Publish to Github Pages
63+
if: success() && github.event_name == 'push' && matrix.java == '8' && github.ref == 'refs/heads/master'
64+
uses: micronaut-projects/github-pages-deploy-action@master
65+
env:
66+
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
67+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
68+
BASE_BRANCH: ${{ env.githubBranch }}
69+
BRANCH: gh-pages
70+
FOLDER: build/docs

.github/workflows/label-sync.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# WARNING: Do not edit this file directly. Instead, go to:
2+
#
3+
# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows
4+
#
5+
# and edit them there. Note that it will be sync'ed to all the Micronaut repos
6+
name: Sync labels
7+
on:
8+
issues:
9+
types: [opened, edited, deleted, labeled, closed]
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Download labels.yml
16+
run: curl -O https://raw.githubusercontent.com/micronaut-projects/micronaut-build/master/labels.yml
17+
- uses: micnncim/action-label-syncer@v1
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
20+
with:
21+
manifest: labels.yml

.github/workflows/release-notes.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# WARNING: Do not edit this file directly. Instead, go to:
2+
#
3+
# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows
4+
#
5+
# and edit them there. Note that it will be sync'ed to all the Micronaut repos
6+
name: Changelog
7+
on:
8+
pull_request:
9+
types: closed
10+
branches:
11+
- master
12+
- '[1-9]+.[0-9]+.x'
13+
issues:
14+
types: [closed,reopened]
15+
push:
16+
branches:
17+
- master
18+
- '[1-9]+.[0-9]+.x'
19+
paths:
20+
- ".github/workflows/release-notes.yml"
21+
jobs:
22+
release_notes:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Check if it has release drafter config file
27+
id: check_release_drafter
28+
run: |
29+
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
30+
echo ::set-output name=has_release_drafter::${has_release_drafter}
31+
32+
# If it has release drafter:
33+
- uses: release-drafter/release-drafter@v5
34+
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
37+
38+
# Otherwise:
39+
- name: Export Gradle Properties
40+
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
41+
uses: micronaut-projects/github-actions/export-gradle-properties@master
42+
- uses: micronaut-projects/github-actions/release-notes@master
43+
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
44+
id: release_notes
45+
with:
46+
token: ${{ secrets.GH_TOKEN }}
47+
branch: ${{ env.githubBranch }}
48+
- uses: ncipollo/release-action@v1
49+
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
50+
with:
51+
allowUpdates: true
52+
commit: ${{ env.githubBranch }}
53+
draft: true
54+
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
55+
tag: v${{ steps.release_notes.outputs.next_version }}
56+
bodyFile: CHANGELOG.md
57+
token: ${{ secrets.GH_TOKEN }}

.github/workflows/release.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# WARNING: Do not edit this file directly. Instead, go to:
2+
#
3+
# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows
4+
#
5+
# and edit them there. Note that it will be sync'ed to all the Micronaut repos
6+
name: Release
7+
on:
8+
release:
9+
types: [published]
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
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: Set the current release version
22+
id: release_version
23+
run: echo ::set-output name=release_version::${GITHUB_REF:11}
24+
- name: Run pre-release
25+
uses: micronaut-projects/github-actions/pre-release@master
26+
env:
27+
MICRONAUT_BUILD_EMAIL: ${{ secrets.MICRONAUT_BUILD_EMAIL }}
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
- name: Publish to Bintray
31+
env:
32+
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
33+
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
34+
run: ./gradlew bintrayUpload docs
35+
- name: Export Gradle Properties
36+
uses: micronaut-projects/github-actions/export-gradle-properties@master
37+
- name: Publish to Github Pages
38+
if: success()
39+
uses: micronaut-projects/github-pages-deploy-action@master
40+
env:
41+
BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
42+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
43+
BASE_BRANCH: ${{ env.githubBranch }}
44+
BRANCH: gh-pages
45+
FOLDER: build/docs
46+
VERSION: ${{ steps.release_version.outputs.release_version }}
47+
- name: Checkout micronaut-core
48+
uses: actions/checkout@v2
49+
with:
50+
token: ${{ secrets.GH_TOKEN }}
51+
repository: micronaut-projects/micronaut-core
52+
ref: ${{ env.githubCoreBranch }}
53+
path: micronaut-core # Must be micronaut-core
54+
continue-on-error: true
55+
- name: Update BOM
56+
uses: micronaut-projects/github-actions/update-bom@master
57+
env:
58+
MICRONAUT_BUILD_EMAIL: ${{ secrets.MICRONAUT_BUILD_EMAIL }}
59+
with:
60+
token: ${{ secrets.GH_TOKEN }}
61+
continue-on-error: true
62+
- name: Run post-release
63+
if: success()
64+
uses: micronaut-projects/github-actions/post-release@master
65+
env:
66+
MICRONAUT_BUILD_EMAIL: ${{ secrets.MICRONAUT_BUILD_EMAIL }}
67+
with:
68+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)