Skip to content

Commit

Permalink
Update java version in actions
Browse files Browse the repository at this point in the history
Add temurin and zulu distribution to matrix
Allow running build action on workflow_dispatch
  • Loading branch information
spikespaz committed Apr 4, 2022
1 parent 821fbe5 commit 18b1def
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
# against bad commits.

name: build
on: [pull_request, push]
on: [pull_request, push, workflow_dispatch]

jobs:
build:
strategy:
matrix:
distribution: [
temurin,
zulu
]
# Use these Java versions
java: [
16 # Minimum supported by Minecraft
17 # Minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-20.04, windows-latest]
Expand All @@ -25,14 +29,15 @@ jobs:
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '16' }} # Only upload artifacts built from LTS java on one OS
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from LTS java on one OS
uses: actions/upload-artifact@v2
with:
name: Artifacts
Expand Down

0 comments on commit 18b1def

Please sign in to comment.