[Change] Reduce file size by avoiding duplicated shading where able #14256
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 | |
| on: | |
| push: | |
| branches-ignore: | |
| - l10n_master | |
| workflow_dispatch: | |
| inputs: | |
| deploy_all: | |
| description: 'Deploy All' | |
| required: true | |
| default: false | |
| type: boolean | |
| deploy_curseforge: | |
| description: 'Deploy CurseForge' | |
| required: true | |
| default: false | |
| type: boolean | |
| deploy_modrinth: | |
| description: 'Deploy Modrinth' | |
| required: true | |
| default: false | |
| type: boolean | |
| deploy_nightbloom: | |
| description: 'Deploy NightBloom' | |
| required: true | |
| default: false | |
| type: boolean | |
| env: | |
| CF_APIKEY: ${{ secrets.CF_APIKEY }} | |
| MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
| NIGHTBLOOM_TOKEN: ${{ secrets.NIGHTBLOOM_TOKEN }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: update cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Set up Gradle JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew --build-cache --info --stacktrace build | |
| - name: Deploy to CurseForge | |
| if: | | |
| inputs.deploy_all || inputs.deploy_curseforge | |
| run: ./gradlew --build-cache --info --stacktrace publishCurseforge | |
| - name: Deploy to Modrinth | |
| if: | | |
| inputs.deploy_all || inputs.deploy_modrinth | |
| run: ./gradlew --build-cache --info --stacktrace publishModrinth | |
| - name: Deploy to NightBloom | |
| if: | | |
| inputs.deploy_all || inputs.deploy_nightbloom | |
| run: ./gradlew --build-cache --info --stacktrace publishNightbloom | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts | |
| path: | | |
| **/build/libs/ | |
| !common/build/libs/ | |
| !buildSrc/build/libs/ | |
| !build/libs/ | |
| !**/*-dev.jar | |
| !**/*-shadow.jar | |
| !**/*-transformProduction*.jar | |
| !**/testmod*/ | |
| - name: stop daemon | |
| run: ./gradlew --stop |