cleanup automation configs by moving all overrides to use the dsl. Th… #1325
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 Lambda | |
| on: | |
| push: | |
| branches: | |
| - '1.**' | |
| pull_request: | |
| jobs: | |
| build: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| name: Build Lambda | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5' | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set-Up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'oracle' | |
| java-version: '21' | |
| architecture: x64 | |
| cache: 'gradle' | |
| - name: Read Gradle Properties | |
| uses: BrycensRanch/read-properties-action@v1.0.4 | |
| id: all | |
| with: | |
| file: gradle.properties | |
| all: true | |
| - name: Publish snapshot to maven | |
| if: github.event_name == 'push' | |
| run: ./gradlew publish -PmavenType=snapshots -PcommitHash=SNAPSHOT -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }} | |
| - name: Generate Summary | |
| if: steps.upload.conclusion == 'success' && github.event_name == 'push' | |
| run: | | |
| cat << EOF >> $GITHUB_STEP_SUMMARY | |
| ### [Lambda ${{ steps.all.outputs.modVersion }} ${{ steps.all.outputs.minecraftVersion }} (${{ env.COMMIT_HASH }})](https://maven.lambda-client.org/snapshots/com/lambda/lambda/${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar) | |
| EOF | |
| - name: Rename jar | |
| if: steps.upload.conclusion == 'failure' || github.event_name == 'pull_request' | |
| run: mv /build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar /build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar | |
| - name: Failover Upload | |
| if: steps.upload.conclusion == 'failure' || github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lambda-nightly | |
| path: | | |
| /build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar |