Skip to content

build: fix workflow java version #85

build: fix workflow java version

build: fix workflow java version #85

Workflow file for this run

name: Build
on:
push:
pull_request:
workflow_dispatch:
release:
types:
- created
jobs:
build_client:
name: Build Client
strategy:
fail-fast: false
matrix:
lwjgl_natives:
- windows
- windows-x86
- linux
- linux-arm64
- linux-arm32
- macos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/[email protected]
with:
java-version: 17
distribution: adopt
cache: gradle
- name: Build with Gradle
env:
FORCE_LWJGL_NATIVE: ${{ matrix.lwjgl_natives }}
run: |
chmod +x ./gradlew
./gradlew :client:build
- name: Upload Artifact ZIP
uses: actions/[email protected]
if: false
with:
name: client-${{ matrix.lwjgl_natives }}.zip
path: client/build/distributions/*.zip
- name: Upload Artifact TAR
uses: actions/[email protected]
if: false
with:
name: client-${{ matrix.lwjgl_natives }}.tar
path: client/build/distributions/*.tar
- name: Upload Release
uses: fnkr/github-action-ghr@v1
if: github.event_name == 'release'
env:
GHR_PATH: client/build/distributions/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_server:
name: Build Server
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/[email protected]
with:
java-version: 11
distribution: adopt
cache: gradle
- name: Build with Gradle
run: |
chmod +x ./gradlew
./gradlew :server:build
- name: Upload Artifact ZIP
uses: actions/[email protected]
if: false
with:
name: server.zip
path: server/build/distributions/*.zip
- name: Upload Artifact TAR
uses: actions/[email protected]
if: false
with:
name: server.tar
path: server/build/distributions/*.tar
- name: Upload Release
uses: fnkr/github-action-ghr@v1
if: github.event_name == 'release'
env:
GHR_PATH: server/build/distributions/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}