cleanup events #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 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 |