Skip to content

Commit

Permalink
Sonatype, JitPack, Kotlin DSL & Updates (#35)
Browse files Browse the repository at this point in the history
* Updated to gradle kotlin dsl
* Added sonatype
* Updated dependencies
* Updated workflows
* Added JitPack

Signed-off-by: Francisco Solis <[email protected]>
  • Loading branch information
Im-Fran authored Feb 15, 2023
1 parent d58ec06 commit 793904b
Show file tree
Hide file tree
Showing 13 changed files with 250 additions and 150 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ jobs:
# Set up the OS
runs-on: ubuntu-latest
env:
# Nexus credentials and GitHub token
NEXUS_USERNAME: '${{ secrets.NEXUS_USERNAME }}'
NEXUS_PASSWORD: '${{ secrets.NEXUS_PASSWORD }}'
# Sonatype Credentials & GitHub token
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}'
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
# Set environment
env: 'prod'
ENV: 'prod'
PROJECT_NAME: 'LoggingModule'
steps:
# Checkout the Code
- name: Checkout Code
uses: actions/checkout@v3
# Set up git hashes environment variables
- name: Git Hashes
uses: Im-Fran/[email protected].1
uses: Im-Fran/[email protected].3
# Set up version from tag environment variables
- name: Version from Tag Action
uses: Im-Fran/[email protected].1
uses: Im-Fran/[email protected].3
with:
remove-first-character: 'v'
# Set up the JDK
Expand All @@ -31,22 +32,30 @@ jobs:
with:
distribution: adopt
java-version: 11
cache: 'gradle'
# Make gradle executable
- name: Make gradle executable
run: chmod +x gradlew
# Clean, Test, Publish and Build (in that order to save the artifact to the action)
- name: Test, Deploy and Build with Gradle
run: ./gradlew clean test publish shadow dokkaHtml
run: ./gradlew clean test shadowJar dokkaHtml publish publishToSonatype closeAndReleaseSonatypeStagingRepository -no-daemon
# Now we store the artifact in the action
- name: Upload the artifact
uses: actions/upload-artifact@v3
with:
name: LoggingModule
path: ./build/libs/LoggingModule-${{ env.VERSION }}.jar
name: ${{ env.PROJECT_NAME }}
path: ./build/libs/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.jar
# Here we upload the binary to the release
- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: ./build/libs/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.jar application/java-archive
# Now we deploy the documents to GitHub pages
- name: Deploy Dokka
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build/dokka
clean: true
clean: true
clean-exclude: |
CNAME
35 changes: 18 additions & 17 deletions .github/workflows/gradle-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Test"
# Only execute this workflow when a PR is opened or when something is pushed to the master branch
on: [push, pull_request]
on: [pull_request]
jobs:
testBuilds:
strategy:
Expand All @@ -12,20 +12,21 @@ jobs:
runs-on: ubuntu-latest
# Set up environment variables
env:
env: 'local' # Set to local, so it won't deploy the jar to the repos
ENV: 'local' # Set to local, so it won't deploy the jar to the repos
steps:
# Checkout code
- name: Checkout Code
uses: actions/checkout@v3
# Setup java and maven
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: ${{ matrix.java-version }}
# Setup executable gradle
- name: Make Gradle executable
run: chmod +x gradlew
# Test building without dokka
- name: Build Jar with Java ${{ matrix.java-version }}
run: ./gradlew clean publish shadow -x dokkaHtml
# Checkout code
- name: Checkout Code
uses: actions/checkout@v3
# Setup java and maven
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: ${{ matrix.java-version }}
cache: 'gradle'
# Setup executable gradle
- name: Make Gradle executable
run: chmod +x gradlew
# Test building without dokka
- name: Build Jar with Java ${{ matrix.java-version }}
run: ./gradlew clean shadowJar test -x dokkaHtml -no-daemon
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v0.3.0 - Snapshot
* Updated to gradle kotlin dsl
* Added sonatype
* Updated dependencies
* Updated workflows
* Added JitPack

## v0.2.2 - Snapshot
* Added `Logger#debug` method
* Added `Logger#severe(String, Exception)` method
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[![](https://jitci.com/gh/TheProgramSrc/SimpleCore-LoggingModule/svg)](https://jitci.com/gh/TheProgramSrc/SimpleCore-LoggingModule)
[![](https://jitpack.io/v/TheProgramSrc/SimpleCore-LoggingModule.svg)](https://jitpack.io/#TheProgramSrc/SimpleCore-LoggingModule)


# SimpleCore-LoggingModule
Just a logger for the SimpleCore API

# Documentation
* [Wiki](https://github.com/TheProgramSrc/SimpleCore-LoggingModule/wiki)
* [JavaDocs](https://docs.theprogramsrc.xyz/SimpleCore-LoggingModule/)
116 changes: 0 additions & 116 deletions build.gradle

This file was deleted.

Loading

0 comments on commit 793904b

Please sign in to comment.