Files
mindustry/.github/workflows/push.yml
Anuken e26205a4f7 Merge remote-tracking branch 'origin/master' into v9
# Conflicts:
#	core/assets/bundles/bundle_ca.properties
#	core/assets/scripts/global.js
#	core/src/mindustry/mod/DataImagePacker.java
#	gradle.properties
#	tools/src/mindustry/tools/SchemaGenerator.java
2026-08-14 12:20:03 -04:00

60 lines
2.0 KiB
YAML

name: Tests
on: [push, workflow_dispatch]
permissions: {}
jobs:
runPush:
permissions:
contents: write # for Update bundles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Trigger BE build
if: ${{ github.repository == 'Anuken/Mindustry' }}
run: |
git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
cd ../MindustryBuilds
BNUM=$(($GITHUB_RUN_NUMBER + 20000))
git tag ${BNUM}
git config --global user.name "Github Actions"
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryBuilds ${BNUM}
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Fetch latest Arc
run: git clone --depth=1 --branch=v9 https://github.com/Anuken/Arc ../Arc
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Update bundles
if: ${{ github.repository == 'Anuken/Mindustry' }}
run: |
./gradlew -DcompileMethodParams updateBundles
if [ -n "$(git status --porcelain)" ]; then
git config --global user.name "Github Actions"
git config --global user.email "actions@github.com"
git add core/assets/bundles/*
git commit -m "Automatic bundle update"
git push
fi
- name: Update scripts, class mappings and map names
if: ${{ github.repository == 'Anuken/Mindustry' }}
run: |
./gradlew -DcompileMethodParams updateScripts fixMaps
if [ -n "$(git status --porcelain)" ]; then
git config --global user.name "Github Actions"
git config --global user.email "actions@github.com"
git add core/assets/scripts/* core/src/mindustry/mod/ClassMap.java
git add core/assets/maps/*
git commit -m "Automatic class mapping and map name update"
git push
fi
- name: Run unit tests
run: ./gradlew tests:test --rerun --stacktrace