🚧 Antenna Work #176
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
| # 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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
| name: Java CI with Gradle | |
| on: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Get branch name | |
| id: get_branch | |
| run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
| - name: Get latest commit hash | |
| id: get_hash | |
| run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Get MC version | |
| uses: christian-draeger/read-properties@908f99d3334be3802ec7cb528395a69d19914e7b | |
| id: get_mc_version | |
| with: | |
| path: gradle.properties | |
| properties: mc_version | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Validate Gradle wrapper | |
| uses: gradle/wrapper-validation-action@9aa31f26bc8e536d1faf4b332bb8365350743a18 | |
| - name: Send building message to discord | |
| if: github.event_name == 'push' && github.repository_id == '779882530' | |
| uses: realRobotix/action-discord-notifier@release-master | |
| with: | |
| webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
| message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }} | |
| - name: Build jar | |
| uses: gradle/gradle-build-action@v2 | |
| with: | |
| arguments: build | |
| - name: Send fabric built file to discord | |
| if: github.event_name == 'push' && github.repository_id == '779882530' | |
| uses: sinshutu/upload-to-discord@master | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
| with: | |
| args: ./fabric/build/libs/*.* | |
| - name: Send forge built file to discord | |
| if: github.event_name == 'push' && github.repository_id == '779882530' | |
| uses: sinshutu/upload-to-discord@master | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
| with: | |
| args: ./neoforge/build/libs/*.* | |
| - name: Archive Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: volcanobay-${{ steps.get_mc_version.outputs.mc_version }}-nightly-${{ steps.get_hash.outputs.sha_short }} | |
| path: build/libs/ |