refactor: Move multiblock scanning out of KitchenImpl #675 #272
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: publish-snapshot | |
| on: | |
| push: | |
| branches: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| - '[0-9]+.[0-9]+' | |
| jobs: | |
| verify-resources: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Validate gradle wrapper | |
| uses: gradle/actions/wrapper-validation@v5 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: temurin | |
| - name: Make gradle wrapper executable | |
| run: chmod +x ./gradlew | |
| - name: Run data generation | |
| run: ./gradlew :fabric:runData | |
| - name: Check for uncommitted datagen changes | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "::error::Generated resources are out of date. Please run data generation and commit the changes." | |
| git diff | |
| exit 1 | |
| fi | |
| - name: Validate en_us.json file | |
| uses: TwelveIterations/validate-minecraft-lang@v1 | |
| prepare-matrix: | |
| runs-on: ubuntu-latest | |
| needs: verify-resources | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.result }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Preparing matrix | |
| id: set-matrix | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const gradleProperties = fs.readFileSync('gradle.properties', 'utf8'); | |
| const includeFabric = gradleProperties.match(/^(?!#)include_fabric\s*=\s*true/m); | |
| const includeForge = gradleProperties.match(/^(?!#)include_forge\s*=\s*true/m); | |
| const includeNeoForge = gradleProperties.match(/^(?!#)include_neoforge\s*=\s*true/m); | |
| const mavenSnapshots = gradleProperties.match(/^(?!#)maven_snapshots\s*=\s*(.+)/m); | |
| return { | |
| loader: ['common', includeFabric ? 'fabric' : false, includeForge ? 'forge' : false, includeNeoForge ? 'neoforge' : false].filter(Boolean), | |
| task: [mavenSnapshots ? 'publish' : 'build'] | |
| }; | |
| publish-snapshot: | |
| runs-on: ubuntu-latest | |
| environment: Snapshots | |
| strategy: | |
| matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}} | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Validate gradle wrapper | |
| uses: gradle/actions/wrapper-validation@v5 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: temurin | |
| - name: Make gradle wrapper executable | |
| run: chmod +x ./gradlew | |
| - name: Extracting version from properties | |
| shell: bash | |
| run: echo "version=$(cat gradle.properties | grep -w "\bversion\s*=" | cut -d= -f2)" >> $GITHUB_OUTPUT | |
| id: extract-version | |
| - name: Bumping version | |
| uses: TwelveIterations/bump-version@v1 | |
| with: | |
| version: ${{ steps.extract-version.outputs.version }} | |
| bump: revision | |
| id: bump-version | |
| - name: Workaround for FG7 | |
| run: ./gradlew | |
| if: matrix.loader == 'forge' | |
| - name: Publish | |
| run: ./gradlew :${{ matrix.loader }}:${{ matrix.task }} '-Pversion=${{ steps.bump-version.outputs.version }}-SNAPSHOT' '-PmavenUsername=${{ secrets.MAVEN_USER }}' '-PmavenPassword=${{ secrets.MAVEN_PASSWORD }}' | |
| needs: prepare-matrix |