From 84523a06d4bb17fad39369c57407d0259086f374 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 2 Feb 2024 21:19:18 +0100 Subject: [PATCH] github actions build --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ .woodpecker/main.yml | 18 ------------------ 2 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .woodpecker/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..407fef30 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + - name: Cache + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ hashFiles('**/build.gradle', '**/gradle-wrapper.properties') }} + - name: Build + run: | + chmod +x ./gradlew + ./gradlew build --no-daemon + - name: Upload + uses: actions/upload-artifact@v3 + with: + path: build/libs/**.jar \ No newline at end of file diff --git a/.woodpecker/main.yml b/.woodpecker/main.yml deleted file mode 100644 index 7063bdb3..00000000 --- a/.woodpecker/main.yml +++ /dev/null @@ -1,18 +0,0 @@ -steps: - build: - image: eclipse-temurin:17-jdk - commands: - - chmod +x ./gradlew - - ./gradlew build --no-daemon - maven-publish: - image: eclipse-temurin:17-jdk - when: - event: [push, manual] - branch: main - commands: - - chmod +x ./gradlew - - ./gradlew publish --no-daemon - environment: - - LOCAL_MAVEN=/var/www/maven - volumes: - - /var/www/maven:/var/www/maven