Skip to content

Commit bc79acc

Browse files
author
Francisco Solis
authored
Merge pull request #20 from TheProgramSrc/patch/updates
2 parents 0e3f379 + 717bf95 commit bc79acc

File tree

16 files changed

+252
-157
lines changed

16 files changed

+252
-157
lines changed

.github/workflows/gradle-build.yml

Lines changed: 20 additions & 11 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: 'NetworkingModule'
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: NetworkingModule
45-
path: ./build/libs/NetworkingModule-${{ 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
48-
uses: JamesIves/[email protected].0
55+
uses: JamesIves/[email protected].1
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: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
# v0.1.0 - Snapshot
1+
## v0.2.0 - Snapshot
2+
* Added jitpack
3+
* Added Sonatype
4+
* Updated dependencies
5+
* Updated workflows
6+
* Updated to gradle kotlin dsl
7+
8+
## v0.1.0 - Snapshot
29
Hello, World!

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-NetworkingModule/svg)](https://jitci.com/gh/TheProgramSrc/SimpleCore-NetworkingModule)
2+
[![](https://jitpack.io/v/xyz.theprogramsrc/SimpleCore-NetworkingModule.svg)](https://jitpack.io/#xyz.theprogramsrc/SimpleCore-NetworkingModule)
3+
[![](https://img.shields.io/nexus/s/xyz.theprogramsrc/networkingmodule?server=https%3A%2F%2Fs01.oss.sonatype.org)]()
4+
15
# SimpleCore-NetworkingModule
26
Networking module for SimpleCore API.
37

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

build.gradle

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

0 commit comments

Comments
 (0)