From 35a2de2edfd179bff7d5b74f8f337252be71b74e Mon Sep 17 00:00:00 2001 From: Mid <125941391+MidnightTale@users.noreply.github.com> Date: Sun, 30 Apr 2023 18:06:34 +0700 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..336340c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build JAR + +on: + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Get project version + run: echo "version=$(grep '^version' build.gradle | cut -d' ' -f3 | tr -d '\"')" >> $GITHUB_ENV + - name: Build with Gradle + run: ./gradlew build -x test + - name: Publish artifact + uses: actions/upload-artifact@v2 + with: + name: FoliaFlow-${{ env.version }}-${{ github.sha }} + path: build/libs/FoliaFlow-${{ env.version }}.jar