worldborder-ignite-mod/.github/workflows/build.yml

37 lines
1 KiB
YAML
Raw Permalink Normal View History

2023-02-12 00:07:37 +01:00
name: "build"
on:
push:
branches: "**"
tags-ignore: ["**"]
pull_request:
concurrency:
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
cancel-in-progress: true
env:
2024-01-07 03:11:20 +01:00
RUNTIME_VERSION: 17
2023-02-12 00:07:37 +01:00
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
if: "${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}"
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
runs-on: "${{ matrix.os }}"
steps:
- name: "checkout repository"
2024-01-07 03:10:25 +01:00
uses: actions/checkout@v4
2023-02-12 00:07:37 +01:00
- name: "setup jdk ${{ env.RUNTIME_VERSION }}"
2024-01-07 03:10:25 +01:00
uses: actions/setup-java@v4
2023-02-12 00:07:37 +01:00
with:
distribution: "temurin"
java-version: "${{ env.RUNTIME_VERSION }}"
- name: "run gradle build"
uses: "gradle/gradle-build-action@v2"
with:
2024-01-07 03:10:25 +01:00
cache-read-only: "${{ !startsWith(github.ref, 'refs/heads/main/') || github.event_name == 'pull_request' }}"
2023-02-12 00:07:37 +01:00
arguments: "build"