fixed deprecated upload-artifact #11
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: Java CI with Gradle | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout code | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Run Shadow Jar | |
run: ./gradlew shadowJar | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packaged-jar | |
path: build/libs/*.jar | |
- name: Archive ShadowJar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Shadow-jar | |
path: Result/*.jar |