Skip to content

Merge pull request #957 from TonytheMacaroni/main #137

Merge pull request #957 from TonytheMacaroni/main

Merge pull request #957 from TonytheMacaroni/main #137

Workflow file for this run

name: Build MagicSpells
on:
push:
branches:
- main
paths-ignore:
- factions/**
- memory/**
- shop/**
- teams/**
- towny/**
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Get commit hash
id: hash
run: echo "sha_short=$(git rev-parse --short ${{github.sha}})" >> $GITHUB_OUTPUT
- name: Get version
id: version
run: echo "version=$(grep version gradle.properties | cut -d"=" -f2 | xargs)" >> $GITHUB_OUTPUT
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run build with Gradle Wrapper
run: ./gradlew "-Pversion=${{steps.version.outputs.version}}-${{steps.hash.outputs.sha_short}}" core:build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: MagicSpells
if-no-files-found: error
path: core/build/libs/MagicSpells*.jar