Skip to content

Commit 356f927

Browse files
author
Francisco Solis
authored
Velocity Support, Updates & Fixes (#34)
* Added sonatype * Added gradle kotlin dsl * Added velocity support * Fixed issue where cancelled bungee tasks won't start again * Updated workflows * Updated dependencies * Updated README.md Signed-off-by: Francisco Solis <[email protected]>
1 parent c159a8e commit 356f927

18 files changed

+323
-161
lines changed

.github/workflows/gradle-build.yml

+14-10
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: 'TasksModule'
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].0
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,27 +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: TasksModule
45-
path: ./build/libs/TasksModule-${{ env.VERSION }}.jar
46+
name: ${{ env.PROJECT_NAME }}
47+
path: ./build/libs/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.jar
4648
# Here we upload the binary to the release
4749
- name: Upload to release
4850
uses: JasonEtco/upload-to-release@master
4951
with:
50-
args: ./build/libs/TasksModule-${{ env.VERSION }}.jar application/java-archive
52+
args: ./build/libs/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.jar application/java-archive
5153
# Now we deploy the documents to GitHub pages
5254
- name: Deploy Dokka
5355
uses: JamesIves/[email protected]
5456
with:
5557
branch: gh-pages
5658
folder: build/dokka
5759
clean: true
60+
clean-exclude: |
61+
CNAME

.github/workflows/gradle-test.yml

+18-17
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

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
# v0.1.1 - Snapshot
1+
## v0.2.0 - Velocity Support, Updates & Fixes
2+
* Added sonatype
3+
* Added gradle kotlin dsl
4+
* Added velocity support
5+
* Fixed issue where cancelled bungee tasks won't start again
6+
* Updated workflows
7+
* Updated dependencies
8+
* Updated README.md
9+
10+
## v0.1.1 - Snapshot
211
* Migration to JitPack
312
* Added JitCI badges
413
* Fixed description
514

6-
# v0.1.0 - Snapshot
15+
## v0.1.0 - Snapshot
716
Hello, World!

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![](https://jitci.com/gh/TheProgramSrc/SimpleCore-TasksModule/svg)](https://jitci.com/gh/TheProgramSrc/SimpleCore-TasksModule)
22
[![](https://jitpack.io/v/xyz.theprogramsrc/SimpleCore-TasksModule.svg)](https://jitpack.io/#xyz.theprogramsrc/SimpleCore-TasksModule)
3+
[![](https://img.shields.io/nexus/s/xyz.theprogramsrc/tasksmodule?server=https%3A%2F%2Fs01.oss.sonatype.org)]()
34

45
# SimpleCore-TasksModule
56
Tasks manager module for SimpleCore API.<br>

SECURITY.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
The following list can tell you if the version is supported or not. If the version is not supported you won't get support from the team
66

7-
| Version | Supported |
8-
|-------| ------------------ |
9-
| 0.1.X | :white_check_mark: |
7+
| Version | Supported | Security Updates |
8+
|---------|---------------------|--------------------|
9+
| 0.2.X | :white_check_mark: | :white_check_mark: |
10+
| 0.1.X | :x: | :x: |
1011

1112
## Reporting a Vulnerability
1213

build.gradle

-113
This file was deleted.

0 commit comments

Comments
 (0)