Complete the port #26
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: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Read Gradle Properties File | |
| uses: kurt-code/[email protected] | |
| id: read-properties | |
| with: | |
| operation: 'read' | |
| file-path: 'gradle.properties' | |
| keys: 'java.version,minecraft.version' | |
| - name: Extract patch version | |
| id: extract-patch | |
| uses: Communi-Suggestu/[email protected] | |
| with: | |
| file: gradle.properties | |
| prefix: 'minecraft.version=' | |
| - name: Extract major and minor version | |
| id: extract-major-minor | |
| uses: Communi-Suggestu/[email protected] | |
| with: | |
| version: ${{ steps.read-properties.outputs['minecraft.version'] }} | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ steps.read-properties.outputs['java.version'] }} | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - name: Build with Gradle | |
| run: ./gradlew assemble | |
| env: | |
| VERSION: ${{ steps.extract-major-minor.outputs.joined }}.${{ steps.extract-patch.outputs.count }} |