Skip to content

Remove debug messages #128

Remove debug messages

Remove debug messages #128

Workflow file for this run

name: Java CI with Gradle
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build with Gradle Wrapper
run: ./gradlew build
- name: Rename JAR file with version and commit hash
run: |
COMMIT_HASH=$(git rev-parse --short HEAD)
for file in ./build/libs/OpenMinetopia-*.jar; do
VERSION=$(basename "$file" | sed -E 's/OpenMinetopia-(.*)\.jar/\1/')
mv "$file" "./build/libs/OpenMinetopia-${VERSION}-${COMMIT_HASH}.jar"
done
- name: Upload a Build Artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: OpenMinetopia
path: ./build/libs/OpenMinetopia-*.jar
- name: Send the jarfile to Discord
if: github.event_name == 'push'
uses: sinshutu/upload-to-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: ./build/libs/OpenMinetopia-*.jar