Add github action to compile JAR
This commit is contained in:
parent
99edf56d1d
commit
cbd83a0f34
52
.github/workflows/build.yml
vendored
Normal file
52
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- README.md
|
||||
- .gitignore
|
||||
- .gitattributes
|
||||
- '**/.git/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- README.md
|
||||
- .gitignore
|
||||
- .gitattributes
|
||||
- '**/*.md'
|
||||
- '**/.git/*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Setup JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Grant execute permission to gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: main-build
|
||||
path: build/libs/*.jar
|
||||
|
||||
Loading…
Reference in New Issue
Block a user