Skip to content

feat: add cache to github actions #6

feat: add cache to github actions

feat: add cache to github actions #6

Workflow file for this run

# This workflow will build a Java project with Ant
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
name: Java CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
architecture: x64
- uses: actions/cache@v3
id: javafx-cache
with:
path: javafx-sdk-21.0.1
key: ${{ runner.os }}-javafx-sdk-21.0.1
- name: Install Dependencies
if: steps.javafx-cache.outputs.cache-hit != 'true'
run: |
curl -o javafx.zip https://download2.gluonhq.com/openjfx/21.0.1/openjfx-21.0.1_linux-x64_bin-sdk.zip
unzip javafx.zip
- name: Build with Ant
run: |
sed -i.bak 's/<property name="fxlib" value=".*"\/>/<property name="fxlib" value="javafx-sdk-21.0.1\/lib"\/>/g' build.xml
ant -noinput -buildfile build.xml
- uses: actions/upload-artifact@v3
with:
name: Package
path: release/kmttg.jar