Skip to content

Build Netherite

Build Netherite #1

Workflow file for this run

name: Build Netherite
on:
workflow_dispatch:
pull_request:
push:
branches:
- "ver/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
cache: 'gradle'
- name: Configure Git
run: git config --global user.email "[email protected]" && git config --global user.name "Github Actions"
- name: Apply Patches
run: ./gradlew applyPatches --no-daemon --stacktrace
- name: Build Reobf Jar
run: ./gradlew createReobfPaperclipJar --no-daemon --stacktrace
- name: Rebuild on Failure
if: ${{ failure() }}
run: |
./gradlew clean cleanCache
./gradlew applyPatches --no-daemon --stacktrace
./gradlew ./gradlew createReobfPaperclipJar --no-daemon --stacktrace
./gradlew generateDevelopmentBundle --no-daemon --stacktrace
- name: Set Commit Hash
id: set_commit_hash
run: echo "COMMIT_HASH=$(git log --format='%H' -n 1)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
name: Build ${{ github.run_number }}
tag_name: ${{ github.run_number }}
body: "[\"artifact_name\"=netherite-launcher.jar]/[\"changes\"=${{ github.event.head_commit.message }}]/[\"commit_hash\"=${{ env.COMMIT_HASH }}]/[\"version\"=MC1.20.2]"
token: ${{ secrets.TOKEN }}
files: build/libs/Netherite-paperclip-1.20.2-R0.1-SNAPSHOT-reobf.jar