-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bcf3d23
commit f073a2d
Showing
1 changed file
with
44 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
|
@@ -10,22 +9,47 @@ jobs: | |
runs-on: ubuntu-latest | ||
if: "!contains(github.event.commits[0].message, '[ci-skip]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: gradle/wrapper-validation-action@v1 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: temurin | ||
java-version: 8 | ||
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Test with Gradle | ||
run: ./gradlew test | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Upload artifacts | ||
uses: "actions/[email protected]" | ||
with: | ||
name: "IridiumSkyblock" | ||
path: "build/libs/IridiumColorAPI-*.jar" | ||
- uses: actions/[email protected] | ||
- uses: gradle/wrapper-validation-action@v1 | ||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Test with Gradle | ||
run: ./gradlew test | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Upload artifacts | ||
uses: "actions/[email protected]" | ||
with: | ||
name: "IridiumColorApi" | ||
path: "build/libs/IridiumColorApi-*.jar" | ||
upload: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: "contains(github.event.commits[0].message, 'Version Increment')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: thecodemonkey/action-get-gradle-version@master | ||
id: version | ||
with: | ||
file: "build.gradle.kts" | ||
- uses: actions/[email protected] | ||
with: | ||
name: "IridiumColorApi" | ||
path: "./" | ||
- name: Publish to Nexus | ||
uses: sonatype-nexus-community/nexus-repo-github-action@master | ||
with: | ||
serverUrl: "https://nexus.iridiumdevelopment.net/" | ||
username: "${{ secrets.NEXUS_USERNAME }}" | ||
password: "${{ secrets.NEXUS_PASSWORD }}" | ||
format: "maven2" | ||
repository: "maven-releases" | ||
coordinates: "groupId=com.iridium artifactId=IridiumColorApi version=${{steps.version.outputs.version}} generate-pom=on" | ||
assets: "extension=jar" | ||
filename: "IridiumColorApi-*.jar" |