Skip to content

Commit 09378cf

Browse files
using kordamp build plugins
1 parent 9a0bfec commit 09378cf

Some content is hidden

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

41 files changed

+598
-149
lines changed

.github/workflows/build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
name: Build
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os: [ ubuntu-latest, macos-latest, windows-latest ]
13+
runs-on: ${{ matrix.os }}
14+
if: startsWith(github.event.head_commit.message, 'Releasing version') != true
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Set up Java
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 11
23+
24+
- uses: actions/cache@v2
25+
with:
26+
path: ~/.gradle/caches
27+
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
28+
restore-keys: |
29+
${{ runner.os }}-gradle-
30+
31+
- uses: actions/cache@v2
32+
with:
33+
path: ~/.gradle/wrapper
34+
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
35+
restore-keys: |
36+
${{ runner.os }}-gradlew-
37+
38+
- name: Build
39+
run: ./gradlew build -S
40+
41+
- name: Show Reports
42+
uses: actions/upload-artifact@v1
43+
if: failure()
44+
with:
45+
name: reports-${{ runner.os }}
46+
path: build/

.github/workflows/early-access.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: EarlyAccess
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
earlyaccess:
9+
name: EarlyAccess
10+
if: github.repository == 'redis-developer/testcontainers-redis' && startsWith(github.event.head_commit.message, 'Releasing version') != true
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Java
19+
uses: actions/setup-java@v1
20+
with:
21+
java-version: 11
22+
23+
- uses: actions/cache@v2
24+
with:
25+
path: ~/.gradle/caches
26+
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
27+
restore-keys: |
28+
${{ runner.os }}-gradle-
29+
30+
- uses: actions/cache@v2
31+
with:
32+
path: ~/.gradle/wrapper
33+
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
34+
restore-keys: |
35+
${{ runner.os }}-gradlew-
36+
37+
- name: Build
38+
run: ./gradlew -Prelease=true build -S
39+
40+
- name: Version
41+
id: vars
42+
run: echo ::set-output name=version::$(cat VERSION)
43+
44+
- name: Assemble
45+
uses: jreleaser/release-action@v1
46+
with:
47+
arguments: assemble
48+
env:
49+
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
50+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Release
53+
uses: jreleaser/release-action@v1
54+
with:
55+
arguments: full-release
56+
env:
57+
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
58+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
60+
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
61+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
62+
JRELEASER_DOCKER_DEFAULT_PASSWORD: ${{ secrets.JRELEASER_DOCKER_PASSWORD }}
63+
64+
- name: JReleaser output
65+
if: always()
66+
uses: actions/upload-artifact@v2
67+
with:
68+
name: artifact
69+
path: |
70+
out/jreleaser/trace.log
71+
out/jreleaser/output.properties

.github/workflows/gradle.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Release version"
8+
required: true
9+
jobs:
10+
release:
11+
name: Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Java
19+
uses: actions/setup-java@v1
20+
with:
21+
java-version: 11
22+
23+
- uses: actions/cache@v2
24+
with:
25+
path: ~/.gradle/caches
26+
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
27+
restore-keys: |
28+
${{ runner.os }}-gradle-
29+
30+
- uses: actions/cache@v2
31+
with:
32+
path: ~/.gradle/wrapper
33+
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
34+
restore-keys: |
35+
${{ runner.os }}-gradlew-
36+
37+
- name: Set release version
38+
run: |
39+
VERSION=${{ github.event.inputs.version }}
40+
echo $VERSION > VERSION
41+
sed -i -e "s/^\:project-version\:\ .*/:project-version: $VERSION/g" README.adoc
42+
git add VERSION
43+
git add README.adoc
44+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
45+
git config --global user.name "GitHub Action"
46+
git commit -a -m "Releasing version $VERSION"
47+
git push origin master
48+
49+
- name: Build
50+
run: |
51+
./gradlew -Prelease=true build -S
52+
53+
- name: Deploy
54+
env:
55+
GITHUB_USERNAME: jruaux
56+
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
57+
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
58+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
59+
run: |
60+
./gradlew -Prelease=true -Pfull-release=true \
61+
-PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} \
62+
-PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }} \
63+
build publishToSonatype closeAndReleaseSonatypeStagingRepository -S
64+
65+
- name: Assemble
66+
uses: jreleaser/release-action@v1
67+
with:
68+
arguments: assemble
69+
env:
70+
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }}
71+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Release
74+
uses: jreleaser/release-action@v1
75+
with:
76+
arguments: full-release
77+
env:
78+
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }}
79+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
81+
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
82+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
83+
JRELEASER_DOCKER_DEFAULT_PASSWORD: ${{ secrets.JRELEASER_DOCKER_PASSWORD }}
84+
JRELEASER_SLACK_WEBHOOK: ${{ secrets.JRELEASER_SLACK_WEBHOOK }}
85+
86+
- name: JReleaser output
87+
if: always()
88+
uses: actions/upload-artifact@v2
89+
with:
90+
name: artifact
91+
path: |
92+
out/jreleaser/trace.log
93+
out/jreleaser/output.properties

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/bin/
2+
/.classpath
3+
/.project
4+
build
5+
/.gradle/
6+
/.settings/
7+
.idea
8+
/out/

0 commit comments

Comments
 (0)