Skip to content

switch project to gradle #1

switch project to gradle

switch project to gradle #1

name: Build and upload jar
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: gradle-${{ runner.os }}-
- name: Build with Gradle
run: ./gradlew clean build
- name: Upload Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
# Artifact name
name: SnowballFight
# A file, directory or wildcard pattern that describes what to upload
path: build/libs/*.jar