Update main.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
on: | |
push | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [ 17 ] | |
os: [ ubuntu-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout | |
uses: actions/[email protected] | |
# - name: validate gradle wrapper | |
# uses: gradle/wrapper-validation-action@v1 | |
- name: setup java ${{ matrix.java }} | |
uses: actions/[email protected] | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Setup cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
- name: make gradle wrapper executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./two_d_craft/gradlew | |
- name: build | |
run: ./two_d_craft/gradlew build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts | |
path: two_d_craft/build/libs/ |