Feature (Module): Add BetterFirework Module (#154) #1306
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: Get Short Commit Hash | |
| id: vars | |
| run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - name: Set-Up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| architecture: x64 | |
| cache: 'gradle' | |
| - name: Read Gradle Properties | |
| uses: BrycensRanch/[email protected] | |
| id: all | |
| with: | |
| file: gradle.properties | |
| all: true | |
| - name: Publish commit to maven | |
| id: upload | |
| run: ./gradlew publish -PmavenType=snapshots -PcommitHash=${{ env.COMMIT_HASH }} -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }} | |
| - name: Publish snapshot to maven | |
| run: ./gradlew publish -PmavenType=snapshots -PcommitHash=SNAPSHOT -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }} | |
| - name: Generate Summary | |
| if: steps.upload.conclusion == 'success' | |
| 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: Failover Upload | |
| if: steps.upload.conclusion == 'failure' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lambda-nightly | |
| path: | | |
| /build/libs/lambda-*-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar |