Skip to content

Commit

Permalink
Merge pull request #36 from TheProgramSrc/patch/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Fran authored Feb 15, 2023
2 parents 1bd5df5 + d028da8 commit 7506d02
Show file tree
Hide file tree
Showing 14 changed files with 246 additions and 163 deletions.
26 changes: 15 additions & 11 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: 'TranslationsModule'
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].0
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,27 +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: TranslationsModule
path: ./build/libs/TranslationsModule-${{ 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/TranslationsModule-${{ env.VERSION }}.jar application/java-archive
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
21 changes: 14 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
# v0.1.6 - Snapshot
## v0.2.0 - Snapshot
* Added sonatype
* Added gradle kotlin dsl
* Updated workflows
* Updated dependencies
* Updated README.md

## v0.1.6 - Snapshot
* Updated depends
* Moved to JitCI
* Improve testing to avoid unwanted files committed

# v0.1.5 - Snapshot
## v0.1.5 - Snapshot
* Now translations are automatically colorized (unless you set `colorize` to `false`)
* Updated tests

# v0.1.4 - Snapshot
## v0.1.4 - Snapshot
* Updated SimpleCoreAPI to v0.3.0-SNAPSHOT
* Now the TranslationManager is initialized at the load stage of the
module
* Added GitHub Repository option for AutoUpdater

# v0.1.3 - Snapshot
## v0.1.3 - Snapshot
* Moved Translation from objects/
* Added new register methods to TranslationManager
* Added mainColor to Translation
Expand All @@ -22,11 +29,11 @@ module
* Created new Tests (TranslationColorTest.kt and TranslationTest.kt)
* Now the Jar is automatically uploaded to the release!

# v0.1.2 - Snapshots
## v0.1.2 - Snapshots
* Fixed dependency FilesModule

# v0.1.1 - Snapshot
## v0.1.1 - Snapshot
* Updated Dependencies

# v0.1.0 - Snapshot
## v0.1.0 - Snapshot
Hello, World!
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![](https://jitci.com/gh/TheProgramSrc/SimpleCore-TranslationsModule/svg)](https://jitci.com/gh/TheProgramSrc/SimpleCore-TranslationsModule)
[![](https://jitpack.io/v/xyz.theprogramsrc/SimpleCore-TranslationsModule.svg)](https://jitpack.io/#xyz.theprogramsrc/SimpleCore-TranslationsModule)
[![](https://img.shields.io/nexus/s/xyz.theprogramsrc/translationsmodule?server=https%3A%2F%2Fs01.oss.sonatype.org)]()

# SimpleCore-TranslationsModule
Translations module for SimpleCore API.
Expand Down
119 changes: 0 additions & 119 deletions build.gradle

This file was deleted.

Loading

0 comments on commit 7506d02

Please sign in to comment.