DESCRIPTIONS #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push, workflow_dispatch] | |
permissions: {} | |
jobs: | |
runPush: | |
permissions: | |
contents: write # for Update bundles | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK Temurin 8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '8' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Update bundles | |
if: ${{ github.repository == 'acemany/MindustryV4' }} | |
run: | | |
./gradlew updateBundles | |
if [ -n "$(git status --porcelain)" ]; then | |
git config --global user.name "Github Actions" | |
git config --global user.email "[email protected]" | |
git add core/assets/bundles/* | |
git commit -m "Automatic bundle update" | |
git push | |
fi | |
- name: Run unit tests | |
run: ./gradlew tests:test --rerun-tasks --stacktrace | |
- name: Trigger BE build | |
if: ${{ github.repository == 'acemany/MindustryV4' }} | |
run: | | |
git clone --depth=1 --branch=master https://github.com/acemany/MindustryV4Builds ../MindustryV4Builds | |
cd ../MindustryV4Builds | |
BNUM=$(($GITHUB_RUN_NUMBER - 14)) | |
git tag ${BNUM} | |
git config --global user.name "Github Actions" | |
git push https://acemany:${{ secrets.API_TOKEN_GITHUB }}@github.com/acemany/MindustryV4Builds ${BNUM} |