From 0468c4c3422530c4ed5502b8b2187a2a3bf12dab Mon Sep 17 00:00:00 2001 From: Rawleenc Date: Thu, 10 Oct 2024 19:25:46 +0200 Subject: [PATCH] ci: add build and upload jobs --- .gitea/workflows/main.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/main.yaml diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml new file mode 100644 index 0000000..b0db778 --- /dev/null +++ b/.gitea/workflows/main.yaml @@ -0,0 +1,31 @@ +name: Build and Upload JAR + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: [ubuntu-latest] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + + - name: Build with Gradle + run: chmod +x gradlew && ./gradlew clean build + + - name: Upload JAR artifact + uses: christopherhx/gitea-upload-artifact@v4 + with: + name: mineclass + path: build/libs/*.jar \ No newline at end of file