Skip to content

Commit 90a2815

Browse files
authored
Merge pull request #34 from kennedykori/develop
release
2 parents 66f18c9 + ef3e225 commit 90a2815

File tree

27 files changed

+11370
-3953
lines changed

27 files changed

+11370
-3953
lines changed

.github/workflows/ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: CI
2+
env:
3+
JDK_DISTRIBUTION: semeru
4+
JDK_VERSION: 11
5+
on: [ push ]
6+
jobs:
7+
build:
8+
permissions:
9+
contents: read
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up JDK
14+
uses: actions/setup-java@v4
15+
with:
16+
distribution: ${{ env.JDK_DISTRIBUTION }}
17+
java-package: jdk
18+
java-version: ${{ env.JDK_VERSION }}
19+
- name: Set up Gradle
20+
uses: gradle/gradle-build-action@v2
21+
with:
22+
# Only write to the cache for builds on the 'main' and 'develop' branches. (Default is 'main' only.)
23+
# Builds on other branches will only read existing entries from the cache.
24+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
25+
gradle-version: wrapper
26+
- name: Build with Gradle
27+
run: ./gradlew build
28+
- name: Generate code coverage report
29+
run: ./gradlew jacocoTestReport
30+
- name: Verify code coverage metrics
31+
run: ./gradlew jacocoTestCoverageVerification
32+
- name: Upload coverage report to Codecov
33+
uses: codecov/codecov-action@v3
34+
with:
35+
directory: ./build/reports/jacoco/test
36+
fail_ci_if_error: true
37+
flags: unittests
38+
token: ${{ secrets.CODECOV_TOKEN }}
39+
release:
40+
# Only run on the 'main' and 'develop' branches.
41+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
42+
needs: [ build ]
43+
permissions: write-all
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
with:
48+
token: ${{ secrets.GH_TOKEN }}
49+
- name: Set up JDK
50+
uses: actions/setup-java@v4
51+
with:
52+
distribution: ${{ env.JDK_DISTRIBUTION }}
53+
java-package: jdk
54+
java-version: ${{ env.JDK_VERSION }}
55+
- name: Set up Gradle
56+
uses: gradle/gradle-build-action@v2
57+
with:
58+
# Only write to the cache for builds on the 'main' and 'develop' branches. (Default is 'main' only.)
59+
# Builds on other branches will only read existing entries from the cache.
60+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
61+
gradle-version: wrapper
62+
- name: Set up GPG
63+
uses: crazy-max/ghaction-import-gpg@v6
64+
with:
65+
git_commit_gpgsign: true
66+
git_committer_email: ${{ secrets.GIT_COMMITTER_EMAIL }}
67+
git_committer_name: ${{ secrets.GIT_COMMITTER_NAME }}
68+
# Currently, signing commits leads to the CI hanging indefinitely.
69+
# See https://github.com/semantic-release/semantic-release/issues/3065
70+
git_tag_gpgsign: false
71+
git_user_signingkey: true
72+
gpg_private_key: ${{ secrets.GPG_KEY }}
73+
passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }}
74+
trust_level: 5
75+
- name: Set up NodeJS
76+
uses: actions/setup-node@v4
77+
with:
78+
cache: npm
79+
node-version-file: .nvmrc
80+
- name: Install semantic-release
81+
run: npm ci
82+
- name: Create a release
83+
env:
84+
DEBUG: semantic-release:*
85+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
86+
GIT_AUTHOR_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
87+
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
88+
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
89+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
90+
GRADLE_SIGNING_KEY: ${{ secrets.GRADLE_SIGNING_KEY }}
91+
GRADLE_SIGNING_PASSWORD: ${{ secrets.GRADLE_SIGNING_PASSWORD }}
92+
GRADLE_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
93+
GRADLE_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
94+
run: npx semantic-release

.gitignore

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
1-
# Ignore Gradle project-specific cache directory
2-
.gradle
3-
4-
# Ignore Gradle build output directory
5-
build
6-
/bin/
7-
/.settings/
1+
# Ignore Eclipse project-specific files and folders
82
.classpath
93
.project
4+
/.settings/
5+
/bin/
6+
7+
# Ignore Gradle project-specific cache and build output directories
8+
.gradle
9+
build
10+
11+
# Ignore IntelliJ IDEA project files
12+
.idea
13+
14+
# Ignore NPM package directories
15+
node_modules/
16+
jspm_packages/
17+
18+
# Ignore temporary files
19+
.netrwhist
20+
.~lock.*
21+
22+
# Ignore Vim files
23+
# - Swap
24+
[._]*.s[a-v][a-z]
25+
[._]*.sw[a-p]
26+
[._]s[a-v][a-z]
27+
[._]sw[a-p]
28+
# - Session
29+
Session.vim
30+
31+
# Ignore VisualStudioCode project files
32+
.history/
33+
.vscode/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/*

.releaserc.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
branches:
2+
- main
3+
- name: develop
4+
channel: dev
5+
prerelease: dev
6+
plugins:
7+
- '@semantic-release/commit-analyzer'
8+
- - '@semantic-release/release-notes-generator'
9+
- linkCompare: true
10+
linkReferences: true
11+
writerOpts:
12+
commitGroupsSort: [ type, title ]
13+
commitSort: [ scope, subject ]
14+
- - semantic-release-replace-plugin
15+
- replacements:
16+
- countMatches: true
17+
files: [ gradle.properties ]
18+
from: version=.*
19+
to: version=${nextRelease.version}
20+
results:
21+
- file: gradle.properties
22+
hasChanged: true
23+
numMatches: 1
24+
numReplacements: 1
25+
- countMatches: true
26+
files: [ README.md ]
27+
from:
28+
- <version>.*</version>
29+
- "'io.github.kennedykori:utils:.*'"
30+
- '"io.github.kennedykori:utils:.*"'
31+
- rev=".*"
32+
to:
33+
- <version>${nextRelease.version}</version>
34+
- "'io.github.kennedykori:utils:${nextRelease.version}'"
35+
- '"io.github.kennedykori:utils:${nextRelease.version}"'
36+
- rev="${nextRelease.version}"
37+
results:
38+
- file: README.md
39+
hasChanged: true
40+
numMatches: 4
41+
numReplacements: 4
42+
- - '@semantic-release/changelog'
43+
- changelogFile: docs/CHANGELOG.md
44+
- - '@semantic-release/exec'
45+
- publishCmd: " export GITHUB_TOKEN='${process.env.GITHUB_TOKEN}'; export ORG_GRADLE_PROJECT_signingKey='${process.env.GRADLE_SIGNING_KEY}'; export ORG_GRADLE_PROJECT_signingPassword='${process.env.GRADLE_SIGNING_PASSWORD}'; export ORG_GRADLE_PROJECT_sonatypePassword='${process.env.GRADLE_SONATYPE_PASSWORD}'; export ORG_GRADLE_PROJECT_sonatypeUsername='${process.env.GRADLE_SONATYPE_USERNAME}'; ./gradlew -Pgithub.username=kennedykori -Psigning.inMemory=true publish && ./gradlew -Pgithub.username=kennedykori -Psigning.inMemory=true findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository"
46+
- - '@semantic-release/git'
47+
- assets: [ docs/CHANGELOG.md, gradle.properties, README.md ]
48+
message: "release: ${nextRelease.version} [skip ci]
49+
50+
51+
${nextRelease.notes}"
52+
- - '@semantic-release/github'
53+
- assets:
54+
- path: build/libs/*.jar
55+
tagFormat: v${version}
56+
# ------------------------------------------------------------------------------
57+
# GLOBAL PLUGIN OPTIONS
58+
# See: https://github.com/semantic-release/semantic-release/blob/master/docs/usage/plugins
59+
# .md#plugin-options-configuration
60+
# ------------------------------------------------------------------------------
61+
parserOptions:
62+
noteKeywords: [ BREAKING CHANGE, BREAKING CHANGES, BREAKING ]
63+
preset: conventionalcommits
64+
presetConfig:
65+
types:
66+
- type: build
67+
hidden: true
68+
- type: ci
69+
hidden: true
70+
- type: chore
71+
scope: deps
72+
section: Dependency Updates
73+
- type: chore
74+
section: Refactors
75+
- type: docs
76+
scope: javadoc
77+
section: Javadoc Updates
78+
- type: docs
79+
hidden: true
80+
- type: feat
81+
section: Features
82+
- type: fix
83+
section: Bug Fixes
84+
- type: release
85+
hidden: true
86+
- type: test
87+
section: hidden
88+
releaseRules:
89+
- type: chore
90+
scope: deps
91+
release: patch
92+
- type: docs
93+
scope: javadoc
94+
release: patch
95+
- type: feat
96+
release: minor
97+
- type: fix
98+
release: patch
99+
- scope: no-release
100+
release: false

.travis.yml

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

0 commit comments

Comments
 (0)