Skip to content

Fix Tridents tracking correctly when thrown #311

Fix Tridents tracking correctly when thrown

Fix Tridents tracking correctly when thrown #311

Workflow file for this run

name: Java CI with Gradle
on:
push:
paths:
- '**.java' # <- Only build, test and publish MineTinker if any .java-files or .yml-files have changed
- '**.yml'
- '**build.gradle'
- '**settings.gradle'
pull_request:
paths:
- '**.java'
- '**.yml'
- '**build.gradle'
- '**settings.gradle'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 16
uses: actions/setup-java@v3
with:
java-version: '16'
distribution: 'adopt'
- name: Preparing build.gradle # <- Only necessary for publishing - changes the version number dependent on the commit sha
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: sed -i -E "/^version/ s/'($|[^a-zA-Z_0-9])/-${{ github.sha }}'/g" ./build.gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Setting up Python for publishing
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: pip3 install requests # Request is needed for publishing over web hook
- name: Publishing Build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: python3 .github/workflows/scripts/publish.py ./build/libs/MineTinker.jar MineTinker ${{ secrets.DiscordWebHook }} ${{ github.sha }}
- name: Upload artifact
uses: actions/[email protected]
with:
name: MineTinker-${{ github.sha }}.jar
path: ./build/libs/MineTinker.jar
if-no-files-found: error