Edited build.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Upload Artifact | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Validate gradle wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Make gradle wrapper executable | |
run: chmod +x ./gradlew | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build with Gradle | |
run: ./gradlew shadowJar | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: build/libs/*.jar |