forked from nisovin/MagicSpells
-
Notifications
You must be signed in to change notification settings - Fork 68
41 lines (39 loc) · 1.14 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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