feat: add baby component support to zombies and implement zombie deat… #3098
This file contains hidden or 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: Allay | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| paths: | |
| - .github/workflows/gradle.yml | |
| - gradle/libs.versions.toml | |
| - gradle.properties | |
| - build.gradle.kts | |
| - api/** | |
| - server/** | |
| - data/** | |
| pull_request: | |
| paths: | |
| - .github/workflows/gradle.yml | |
| - gradle/libs.versions.toml | |
| - gradle.properties | |
| - build.gradle.kts | |
| - api/** | |
| - server/** | |
| - data/** | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'zulu' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| gradle-version: wrapper | |
| cache-overwrite-existing: true | |
| cache-read-only: false | |
| build-scan-publish: true | |
| build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | |
| build-scan-terms-of-use-agree: "yes" | |
| - name: Build | |
| run: | | |
| chmod +x gradlew | |
| ./gradlew build | |
| - name: Generate Coverage Reports | |
| if: success() | |
| run: ./gradlew jacocoTestReport | |
| - name: Upload Coverage Reports to Codecov | |
| uses: codecov/codecov-action@v6.0.0 | |
| if: success() | |
| with: | |
| directory: .jacoco/test/ | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Find Shaded Jar | |
| id: vars | |
| run: | | |
| SHADED_JAR_PATH=$(find server/build/libs -name "allay-server-*-shaded.jar" -print -quit) | |
| SHADED_JAR_NAME=$(basename "$SHADED_JAR_PATH") | |
| echo "shaded_jar_path=$SHADED_JAR_PATH" >> $GITHUB_OUTPUT | |
| echo "shaded_jar_name=$SHADED_JAR_NAME" >> $GITHUB_OUTPUT | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v7 | |
| if: success() | |
| with: | |
| name: allay-server | |
| path: ${{ steps.vars.outputs.shaded_jar_path }} | |
| - name: Publish to Maven Central | |
| if: success() && github.event_name == 'push' && github.repository == 'AllayMC/Allay' && contains(github.ref_name, 'master') | |
| run: | | |
| ./gradlew api:publishToMavenCentral | |
| ./gradlew server:publishToMavenCentral | |
| env: | |
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} | |
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SONATYPE_SECRET_KEY }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SONATYPE_SECRET_KEY_PASSWORD }} | |
| - name: Set Tag | |
| if: success() && github.event_name == 'push' && github.repository == 'AllayMC/Allay' && contains(github.ref_name, 'master') | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git tag -f -a nightly -m "Nightly build" | |
| git push origin -f --follow-tags nightly | |
| - name: Update Nightly Build | |
| uses: AllayMC/deploy-nightly@v3.3.0 | |
| if: success() && github.event_name == 'push' && github.repository == 'AllayMC/Allay' && contains(github.ref_name, 'master') | |
| with: | |
| upload_url: https://uploads.github.com/repos/AllayMC/Allay/releases/185111149/assets{?name,label} | |
| release_id: 185111149 | |
| asset_path: ./${{ steps.vars.outputs.shaded_jar_path }} | |
| asset_name: ${{ steps.vars.outputs.shaded_jar_name }} | |
| old_asset_name: allay-server-$$-shaded.jar | |
| asset_content_type: application/zip | |
| max_releases: 1 | |
| - name: Restart Test Server | |
| uses: fjogeleit/http-request-action@v2 | |
| if: success() && github.event_name == 'push' && github.repository == 'AllayMC/Allay' && contains(github.ref_name, 'master') | |
| continue-on-error: true | |
| with: | |
| url: 'http://${{ secrets.TEST_SERVER_HOST }}:${{ secrets.REMOTE_COMMAND_PORT }}/remotecommand?token=${{ secrets.REMOTE_COMMAND_TOKEN }}&command=stop' | |
| method: 'POST' |