Support EnderStorage; #63
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: Build Mod | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 1.20.1-6.0.0-forge | |
| paths: | |
| - src/* | |
| - gradle/* | |
| - .github/workflows/* | |
| - build.gradle | |
| - gradle.properties | |
| - settings.gradle | |
| - Dockerfile | |
| jobs: | |
| toLowerCase: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| lower_repository: ${{ steps.toLowerCase.outputs.lower_repository }} | |
| steps: | |
| - name: Lowercase the repo name | |
| id: toLowerCase | |
| run: echo "lower_repository=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT | |
| build: | |
| permissions: | |
| contents: write | |
| packages: read | |
| runs-on: ubuntu-22.04 | |
| container: | |
| image: ghcr.io/${{ needs.toLowerCase.outputs.lower_repository }}:1.20.1-6.0.0-forge | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| needs: toLowerCase | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Use Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./run | |
| key: ${{ github.workflow_ref }} | |
| - name: Build with Gradle | |
| run: gradle build | |
| - uses: Kir-Antipov/mc-publish@v3.3 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| github-tag: 1.20.1-6.0.0-Forge_NeoForge | |
| github-draft: false | |
| github-prerelease: true | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Build Artifact | |
| include-hidden-files: true | |
| path: | | |
| **/logs/ | |
| **/crash-reports/ | |
| build/libs | |
| retention-days: 1 | |
| if: always() | |
| GameTest: | |
| strategy: | |
| max-parallel: 2 | |
| fail-fast: false | |
| matrix: | |
| GameTestConfig: [ default, testAE ] | |
| permissions: | |
| contents: write | |
| packages: read | |
| needs: toLowerCase | |
| runs-on: ubuntu-22.04 | |
| container: | |
| image: ghcr.io/${{ needs.toLowerCase.outputs.lower_repository }}:1.20.1-6.0.0-forge | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Use Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./run | |
| key: "${{ github.workflow_ref }}-${{ matrix.GameTestConfig }}" | |
| - name: Test Server with ${{ matrix.GameTestConfig }} | |
| run: gradle runGameTestServer -PGameTestConfig=${{ matrix.GameTestConfig }} | |
| continue-on-error: true | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Test Artifact of ${{ matrix.GameTestConfig }} | |
| include-hidden-files: true | |
| path: | | |
| **/logs/ | |
| **/crash-reports/ | |
| build/libs | |
| retention-days: 7 | |
| if: always() |