Fix GitHub Actions #6
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
# Used when building external pull requests | |
# We don't want to publish build artifacts or expose our other caches to possibly untrusted code | |
name: Build - PR | |
on: [ pull_request ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ 17 ] | |
steps: | |
- 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: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'corretto' | |
java-version: ${{ matrix.java }} | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-read-only: true | |
- name: Build w/ Gradle Wrapper | |
run: ./gradlew build | |
- name: Upload Build Artifacts | |
if: ${{ matrix.java == '17' }} # Only upload artifacts built from latest Java | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tacz-artifacts | |
path: build/libs/*.jar |