This repository was archived by the owner on Aug 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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
68ee816
commit ab7545c
Showing
1 changed file
with
17 additions
and
55 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,5 +1,5 @@ | ||
name: Build | ||
on: [push] | ||
on: [ push ] | ||
jobs: | ||
build: | ||
|
||
|
@@ -11,8 +11,9 @@ jobs: | |
|
||
steps: | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Cache Gradle | ||
|
@@ -22,7 +23,7 @@ jobs: | |
path: ~/.gradle | ||
key: ${{ runner.os }}-gradle | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Grant execute permission to gradlew | ||
run: chmod +x gradlew | ||
|
@@ -31,71 +32,32 @@ jobs: | |
run: ./gradlew build shadowJar -x test | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_URL: "https://api.github.com/" | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: "**/build/libs" | ||
|
||
test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Cache Gradle | ||
id: cache-gradle | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle | ||
key: ${{ runner.os }}-gradle | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Grant execute permission to gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Test | ||
run: ./gradlew test | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Coverage | ||
run: ./gradlew jacocoTestReport | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload CodeCov Report | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
file: "**/build/reports/jacoco/**/*.xml" | ||
|
||
- name: Publish Unit Test Results | ||
uses: EnricoMi/[email protected] | ||
if: always() | ||
with: | ||
files: "**/build/test-results/**/*.xml" | ||
|
||
release: | ||
needs: [build, test] | ||
if: github.ref == 'refs/heads/master' || 'refs/heads/beta' || github.ref == 'refs/heads/alpha' | ||
needs: [ build ] | ||
if: github.ref == 'refs/heads/main' || 'refs/heads/beta' || github.ref == 'refs/heads/alpha' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Set up Node.js v18.x | ||
uses: actions/setup-node@v3 | ||
- name: Set up Node.js v20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18.x" | ||
node-version: "20.x" | ||
|
||
- name: Cache Gradle | ||
id: cache-gradle | ||
|
@@ -104,7 +66,7 @@ jobs: | |
path: ~/.gradle | ||
key: ${{ runner.os }}-gradle | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|