diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..721d90d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,51 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Build NadBlocks + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Clone and build Nova 0.17 + run: | + git clone https://github.com/xenondevs/Nova.git + cd Nova + git checkout ver/0.17 + ./gradlew publishToMavenLocal + + - name: Build NadBlocks + run: | + gradlew addonJar + + - name: Upload Build + uses: actions/upload-artifact@v4 + with: + name: NadBlocks + path: build/libs/nadblocks-*