fix: stop mavenLocal from shadowing Paperdev-bundle metadata #19
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: Gradle Package | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 | |
| - name: Validate gradle wrapper | |
| uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 | |
| - name: Set up JDK 21 and 25 | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: "temurin" | |
| java-version: | | |
| 21 | |
| 25 | |
| cache: "gradle" | |
| - name: Build with Gradle | |
| run: chmod +x gradlew && ./gradlew shadowJar -x test --no-daemon | |
| - name: Upload PacketAPI jar | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: packetapi-build | |
| path: build/libs/PacketAPI-*.jar | |
| if-no-files-found: error | |
| - name: Publish snapshot to Reposilite | |
| if: github.event_name == 'push' | |
| run: | | |
| if [ -z "${REPOSILITE_USER}" ] || [ -z "${REPOSILITE_TOKEN}" ]; then | |
| echo "Missing REPOSILITE_USER / REPOSILITE_TOKEN secrets (token name + secret)." | |
| exit 1 | |
| fi | |
| ./gradlew publishSnapshot -x test --no-daemon | |
| env: | |
| REPOSILITE_USER: ${{ secrets.REPOSILITE_USER }} | |
| REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }} |