Skip to content

Merge pull request #5749 from IllianiCBT/history #2

Merge pull request #5749 from IllianiCBT/history

Merge pull request #5749 from IllianiCBT/history #2

name: Validate Name Changes List
# This Action Definition should be triggered only on master being updated or Pull Requests being added or updated against master.
on:
push:
branches: [master]
paths:
# Necessary when the name_changes.txt list is updated or any unit file.
- "megamek/data/mechfiles/**.blk"
- "megamek/data/mechfiles/**.mtf"
- "megamek/data/mechfiles/name_changes.txt"
pull_request:
branches: [master]
paths:
- "megamek/data/mechfiles/**.blk"
- "megamek/data/mechfiles/**.mtf"
- "megamek/data/mechfiles/name_changes.txt"
jobs:
name_changes_validator:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # For CI/CD running on *nix is sufficient
java-distribution: [temurin]
java-version: [17]
fail-fast: false
steps:
- name: "Checkout MegaMek"
uses: actions/checkout@v4
with:
path: megamek
- name: Set up ${{ matrix.java-distribution }} JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.java-distribution }}
java-version: ${{ matrix.java-version }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
working-directory: megamek
run: ./gradlew build
- name: Validate Name Changes
working-directory: megamek
run: java -cp build/libs/MegaMek.jar megamek.utilities.NameChangesValidator