From 470e97c1f88b70722a22a507aebfe3ec5fe62cb0 Mon Sep 17 00:00:00 2001 From: wtlgo <50925676+wtlgo@users.noreply.github.com> Date: Sun, 26 Nov 2023 06:20:16 +0300 Subject: [PATCH] Create ci.yml --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..293d2db --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: Java CI +on: [ push ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + - uses: actions/setup-java@v3.13.0 + with: + java-version: '17' + distribution: 'adopt' + - name: Get Commit Data + id: commit + uses: prompt/actions-commit-hash@v3.0.0 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Change Wrapper Permissions + run: chmod +x ./gradlew + - name: Gradle Build + uses: gradle/gradle-build-action@v2.9.0 + with: + arguments: shadowJar --scan + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: dev-${{ steps.commit.outputs.short }} + - uses: actions/upload-artifact@v3.1.3 + with: + name: MikChanNoMOTD-dev-${{ steps.commit.outputs.short }}.zip + path: | + build/libs/ + LICENSE.txt