Skip to content

Commit 1885d26

Browse files
author
Francisco Solis
authored
New Repos & Updates (#26)
* Added JitPack * Added Sonatype * Updated dependencies * Migrated to kotlin dsl * Updated workflows Signed-off-by: Francisco Solis <[email protected]>
1 parent edac8ab commit 1885d26

File tree

14 files changed

+251
-156
lines changed

14 files changed

+251
-156
lines changed

.github/workflows/gradle-build.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ jobs:
77
# Set up the OS
88
runs-on: ubuntu-latest
99
env:
10-
# Nexus credentials and GitHub token
11-
NEXUS_USERNAME: '${{ secrets.NEXUS_USERNAME }}'
12-
NEXUS_PASSWORD: '${{ secrets.NEXUS_PASSWORD }}'
10+
# Sonatype Credentials & GitHub token
11+
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}'
12+
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}'
1313
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
1414
# Set environment
15-
env: 'prod'
15+
ENV: 'prod'
16+
PROJECT_NAME: 'UIsModule'
1617
steps:
1718
# Checkout the Code
1819
- name: Checkout Code
1920
uses: actions/checkout@v3
2021
# Set up git hashes environment variables
2122
- name: Git Hashes
22-
uses: Im-Fran/[email protected].1
23+
uses: Im-Fran/[email protected].3
2324
# Set up version from tag environment variables
2425
- name: Version from Tag Action
25-
uses: Im-Fran/[email protected].1
26+
uses: Im-Fran/[email protected].3
2627
with:
2728
remove-first-character: 'v'
2829
# Set up the JDK
@@ -31,22 +32,30 @@ jobs:
3132
with:
3233
distribution: adopt
3334
java-version: 11
35+
cache: 'gradle'
3436
# Make gradle executable
3537
- name: Make gradle executable
3638
run: chmod +x gradlew
3739
# Clean, Test, Publish and Build (in that order to save the artifact to the action)
3840
- name: Test, Deploy and Build with Gradle
39-
run: ./gradlew clean test publish shadow dokkaHtml
41+
run: ./gradlew clean test shadowJar dokkaHtml publish publishToSonatype closeAndReleaseSonatypeStagingRepository -no-daemon
4042
# Now we store the artifact in the action
4143
- name: Upload the artifact
4244
uses: actions/upload-artifact@v3
4345
with:
44-
name: UIsModule
45-
path: ./build/libs/UIsModule-${{ env.VERSION }}.jar
46+
name: ${{ env.PROJECT_NAME }}
47+
path: ./build/libs/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.jar
48+
# Here we upload the binary to the release
49+
- name: Upload to release
50+
uses: JasonEtco/upload-to-release@master
51+
with:
52+
args: ./build/libs/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.jar application/java-archive
4653
# Now we deploy the documents to GitHub pages
4754
- name: Deploy Dokka
4855
uses: JamesIves/[email protected]
4956
with:
5057
branch: gh-pages
5158
folder: build/dokka
52-
clean: true
59+
clean: true
60+
clean-exclude: |
61+
CNAME

.github/workflows/gradle-test.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Test"
22
# Only execute this workflow when a PR is opened or when something is pushed to the master branch
3-
on: [push, pull_request]
3+
on: [pull_request]
44
jobs:
55
testBuilds:
66
strategy:
@@ -12,20 +12,21 @@ jobs:
1212
runs-on: ubuntu-latest
1313
# Set up environment variables
1414
env:
15-
env: 'local' # Set to local, so it won't deploy the jar to the repos
15+
ENV: 'local' # Set to local, so it won't deploy the jar to the repos
1616
steps:
17-
# Checkout code
18-
- name: Checkout Code
19-
uses: actions/checkout@v3
20-
# Setup java and maven
21-
- name: Set up JDK ${{ matrix.java-version }}
22-
uses: actions/setup-java@v3
23-
with:
24-
distribution: adopt
25-
java-version: ${{ matrix.java-version }}
26-
# Setup executable gradle
27-
- name: Make Gradle executable
28-
run: chmod +x gradlew
29-
# Test building without dokka
30-
- name: Build Jar with Java ${{ matrix.java-version }}
31-
run: ./gradlew clean publish shadow -x dokkaHtml
17+
# Checkout code
18+
- name: Checkout Code
19+
uses: actions/checkout@v3
20+
# Setup java and maven
21+
- name: Set up JDK ${{ matrix.java-version }}
22+
uses: actions/setup-java@v3
23+
with:
24+
distribution: adopt
25+
java-version: ${{ matrix.java-version }}
26+
cache: 'gradle'
27+
# Setup executable gradle
28+
- name: Make Gradle executable
29+
run: chmod +x gradlew
30+
# Test building without dokka
31+
- name: Build Jar with Java ${{ matrix.java-version }}
32+
run: ./gradlew clean shadowJar test -x dokkaHtml -no-daemon

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## v0.2.0 - New Repos & Updates
2+
* Added JitPack
3+
* Added Sonatype
4+
* Updated dependencies
5+
* Migrated to kotlin dsl
6+
* Updated workflows
7+
18
## v0.1.1 - Snapshot
29
* Added Dialogs
310
* Moved `xyz.theprogramsrc.uismodule.simple.SimpleUi` to `xyz.theprogramsrc.uismodule.ui.SimpleUi`

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
[![](https://jitci.com/gh/TheProgramSrc/SimpleCore-UIsModule/svg)](https://jitci.com/gh/TheProgramSrc/SimpleCore-UIsModule)
2+
[![](https://jitpack.io/v/TheProgramSrc/SimpleCore-UIsModule.svg)](https://jitpack.io/#TheProgramSrc/SimpleCore-UIsModule)
3+
[![](https://img.shields.io/nexus/s/xyz.theprogramsrc/uismodule?server=https%3A%2F%2Fs01.oss.sonatype.org)]()
4+
15
# SimpleCore-UIsModule
26
UI Builder module for SimpleCore API.
37

48
# Documentation
59
* [Wiki](https://github.com/TheProgramSrc/SimpleCore-UIsModule/wiki)
6-
* [JavaDocs](https://theprogramsrc.github.io/SimpleCore-UIsModule/)
10+
* [JavaDocs](https://docs.theprogramsrc.xyz/SimpleCore-UIsModule/)

build.gradle

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

0 commit comments

Comments
 (0)