-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1975aae
commit a03e9b0
Showing
6 changed files
with
236 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: 'Setup Gradle' | ||
description: 'Grant execute permissions and validate Gradle wrapper' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Grant execute permissions for Gradle wrapper | ||
run: chmod +x gradlew | ||
shell: bash | ||
|
||
- name: Validate Gradle Wrapper Authenticity | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Setup Gradle and Caching | ||
uses: gradle/actions/setup-gradle@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Setup JDK' | ||
description: 'Set up JDK' | ||
|
||
inputs: | ||
java-version: | ||
description: 'Java version' | ||
required: true | ||
default: '8' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ inputs.java-version }} | ||
distribution: 'temurin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'master' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
discussions: write | ||
pull-requests: write | ||
|
||
jobs: | ||
tests: | ||
name: Run Tests | ||
uses: ./.github/workflows/tests.yml | ||
release: | ||
name: Create Release | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
java: [8] | ||
runs-on: ${{ matrix.os }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
needs: [tests] | ||
steps: | ||
# Checkout repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# Setup JDK | ||
- name: Setup JDK | ||
uses: ./.github/actions/jdk | ||
with: | ||
java-version: ${{ matrix.java }} | ||
|
||
# Setup Gradle & Verify wrapper | ||
- name: Setup Gradle | ||
uses: ./.github/actions/gradle | ||
|
||
# Makes the next semantic tag variable available for use in workflow | ||
- uses: jveldboom/action-conventional-versioning@v1 | ||
id: version | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
default-bump: patch | ||
|
||
# Build with Gradle & Publish to Maven repository | ||
- name: Build with Gradle | ||
run: ./gradlew clean build publish -PcustomVersion=${{ steps.version.outputs.version }} | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_NAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_SECRET }} | ||
|
||
# Generate changelog | ||
- name: Changelog | ||
uses: ardalanamini/auto-changelog@v4 | ||
id: changelog | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-types: | | ||
feat: New Features | ||
fix: Bug Fixes | ||
build: Build System & Dependencies | ||
perf: Performance Improvements | ||
docs: Documentation | ||
test: Tests | ||
refactor: Refactors | ||
chore: Chores | ||
ci: CI | ||
style: Code Style | ||
revert: Reverts | ||
default-commit-type: Other Changes | ||
release-name: ${{ steps.version.outputs.version-with-prefix }} | ||
mention-authors: true | ||
mention-new-contributors: true | ||
include-compare-link: true | ||
include-pr-links: true | ||
include-commit-links: true | ||
semver: true | ||
use-github-autolink: true | ||
|
||
# Create release | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
${{ github.workspace }}/build/libs/* | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag_name: ${{ steps.version.outputs.version-with-prefix }} | ||
draft: false | ||
prerelease: ${{ contains(github.ref_name, '-RC-') }} | ||
generate_release_notes: false | ||
body: ${{ steps.changelog.outputs.changelog }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Run Tests | ||
|
||
on: | ||
push: | ||
branches-ignore: # Tests are triggered from release workflow | ||
- 'main' | ||
- 'master' | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: write | ||
discussions: write | ||
pull-requests: write | ||
|
||
jobs: | ||
test-build: | ||
name: Test Build | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
java: [8] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
# Checkout repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# Setup JDK | ||
- name: Setup JDK | ||
uses: ./.github/actions/jdk | ||
with: | ||
java-version: ${{ matrix.java }} | ||
|
||
# Setup Gradle & Verify wrapper | ||
- name: Setup Gradle | ||
uses: ./.github/actions/gradle | ||
|
||
# Makes the next semantic tag variable available for use in workflow | ||
- uses: jveldboom/action-conventional-versioning@v1 | ||
id: version | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
default-bump: patch | ||
|
||
# Build with Gradle | ||
- name: Build with Gradle | ||
run: ./gradlew clean build -PcustomVersion=${{ steps.version.outputs.version }}-SNAPSHOT-${{ github.run_number }} --info | ||
|
||
# Upload build results | ||
- name: Upload build results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Build ${{ steps.version.outputs.version-with-prefix }}-SNAPSHOT-${{ github.run_number }} | ||
path: ${{ github.workspace }}/build/libs/ | ||
retention-days: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.