fix stupid logic flow and make the codespace sign hider,, actually work #36
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 Fabric Mod (No Release) | |
| on: | |
| push: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Cache Gradle Packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }} | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Set mod_version in gradle.properties | |
| run: echo "mod_version=DEV-${{ github.run_number }}" >> gradle.properties | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Find Main JAR File | |
| id: find_jar | |
| run: | | |
| JAR_FILE=$(ls build/libs/*.jar | grep -v -- "-sources.jar") | |
| echo "JAR_FILE=$JAR_FILE" >> $GITHUB_ENV | |
| - name: Upload built mod JAR | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ${{ env.JAR_FILE }} |