fix test #4
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
name: Master | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
lint: | |
name: Lint Kotlin | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Run lintKotlin | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: lintKotlin --scan | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Run tests | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: test --scan | |
- name: Publish Test Results | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
summary: true | |
build-publish: | |
name: Publish Maven to KotlinBukkitAPI-Repository | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Clone KotlinBukkitAPI-Repository | |
uses: actions/checkout@v2 | |
with: | |
repository: KotlinMinecraft/KotlinBukkitAPI-Repository | |
path: build/repository | |
token: ${{ secrets.KBAPI_GH_TOKEN }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Execute Gradlew publishToMavenLocal | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: publishToMavenLocal --scan | |
- name: Copy files to repository | |
run: cp -r ~/.m2/repository/* /build/repository | |
- name: Commit and Push | |
run: | | |
COMMIT_NAME=$(git log --format=%B -n 1) | |
cd build/repository | |
git config --global user.name "GitHub Action" | |
git config --global user.email "action@github.com" | |
git add . | |
git commit -m "$COMMIT_NAME" | |
git push |