Skip to content
Closed

3.3 #152

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Normalise line endings — auto-detect text, keep LF
* text=auto eol=lf

# Windows batch scripts MUST be CRLF or cmd.exe will misinterpret them
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Unix shell scripts stay LF even on Windows checkouts
*.sh text eol=lf
gradlew text eol=lf

# Binary formats — never diff, never touch
*.jar binary
*.class binary
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ogg binary
*.wav binary
*.mp3 binary
*.zip binary
*.tar.gz binary
*.gz binary

# Java sources
*.java text eol=lf diff=java
*.gradle text eol=lf
*.properties text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.md text eol=lf
70 changes: 55 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,69 @@
name: build
on: [ push, pull_request ]
name: Build

on:
push:
branches: ['**']
tags: ['*']
pull_request:
workflow_dispatch: {}

permissions:
contents: write # required to attach artifacts to the Release on tag push

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- name: checkout repository
- name: Checkout
uses: actions/checkout@v4
- name: validate gradle wrapper

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: setup jdk 25

- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 25
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
distribution: temurin
java-version: '25'

- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle', 'gradle.properties', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}-

- name: Make Gradle wrapper executable
if: runner.os != 'Windows'
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' }}

- name: Build
run: ./gradlew clean build --no-daemon --stacktrace

- name: Upload build artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
path: build/libs/
name: factions-${{ github.sha }}
path: build/libs/*.jar
if-no-files-found: error

- name: Attach to GitHub Release
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: build/libs/*.jar
fail_on_unmatched_files: true
42 changes: 0 additions & 42 deletions .github/workflows/publish.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ bin/

run/
remappedSrc/

# session/build artifacts

.omo/
logs/
xaero/
Loading