Skip to content

Merge pull request #842 from Chronoken/main #28

Merge pull request #842 from Chronoken/main

Merge pull request #842 from Chronoken/main #28

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@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- 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@v3
with:
name: MagicSpells
if-no-files-found: error
path: core/build/libs/MagicSpells*.jar