Merge pull request #957 from TonytheMacaroni/main #137
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |