oh fr? on god? just like that? (WIP) #1604
Workflow file for this run
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: gradle-ci | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Cache/Uncache Sodium | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/loom-cache | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build artifacts | |
run: ./gradlew build | |
- name: Extract current branch name | |
shell: bash | |
# bash pattern expansion to grab branch name without slashes | |
run: ref="${GITHUB_REF#refs/heads/}" && echo "branch=${ref////-}" >> $GITHUB_OUTPUT | |
id: ref | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: sodium-artifacts-${{ steps.ref.outputs.branch }} | |
# Filter built files to disregard -sources and -dev, and leave only the minecraft-compatible jars. | |
path: build/libs/*[0-9].jar |