Skip to content

Attempted to setup the thing #5

Attempted to setup the thing

Attempted to setup the thing #5

Workflow file for this run

name: Tests
on: [push, workflow_dispatch]
permissions: {}
jobs:
runPush:
permissions:
contents: write # for Update bundles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Trigger BE build
if: ${{ github.repository == 'Anuken/Mindustry' }}
run: |
git clone --depth=1 --branch=master https://github.com/5GameMaker/MindustryHotfixBuilds ../MindustryBuilds
cd ../MindustryBuilds
BNUM=$(($GITHUB_RUN_NUMBER + 20000))
git tag ${BNUM}
git config --global user.name "Github Actions"
git push https://5GameMaker:${{ secrets.API_TOKEN_GITHUB }}@github.com/5GameMaker/MindustryHotfixBuilds ${BNUM}
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Update bundles
if: ${{ github.repository == 'Anuken/Mindustry' }}
run: |
./gradlew updateBundles
if [ -n "$(git status --porcelain)" ]; then
git add core/assets/bundles/*
git commit -m "Automatic bundle update"
git push
fi
# - name: Update JITpack repo
# if: ${{ github.repository == 'Anuken/Mindustry' }}
# run: |
# git config --global user.name "Github Actions"
# git config --global user.email "[email protected]"
# cd ../
# cp -r ./Mindustry ./MindustryJitpack
# cd MindustryJitpack
# git clone --depth 1 https://github.com/Anuken/MindustryJitpack.git
# rm -rf .git
# cp -r ./MindustryJitpack/.git ./.git
# rm -rf MindustryJitpack
# rm -rf .github
# rm README.md
# git add .
# git commit --allow-empty -m "${GITHUB_SHA}"
# git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryJitpack
# cd ../Mindustry
- name: Run unit tests
run: ./gradlew clean cleanTest test --stacktrace