Skip to content

hotfix but not really #5

hotfix but not really

hotfix but not really #5

name: Build And Test
on:
workflow_dispatch:
push:
pull_request: # do not use pull_request_target since it probably won't up to date with PR
types:
- opened
- synchronize
concurrency:
group: build-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Check & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Gradle Check
run: ./gradlew check
build:
if: ${{ github.event_name != 'push' }}
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Gradle Build
run: ./gradlew build "-Dmod_artifact_suffix=-pr${{ github.event.pull_request.number }}-$(git rev-parse --short ${{ github.sha }})"
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Starlance Built Jar
path: build/libs
overwrite: true
if-no-files-found: error