Merge pull request #716 from st0x0ef/26.1 #1
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 and Release (1.21.11) | |
| on: | |
| push: | |
| paths: | |
| - '**.gradle' | |
| - '**.properties' | |
| - '**/src/**' | |
| - '.github/**' | |
| branches: | |
| - "26.1" | |
| workflow_dispatch: | |
| inputs: | |
| norelease: | |
| description: 'Do not publish' | |
| required: true | |
| default: 'false' | |
| jobs: | |
| build: | |
| name: "Build and Release" | |
| runs-on: ubuntu-24.04 | |
| if: | | |
| !contains(github.event.head_commit.message, '[ci skip]') | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: 'temurin' | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/actions/wrapper-validation@v5 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Verify license using Licenser | |
| run: ./gradlew licenseCheck | |
| - name: Build with Gradle | |
| run: ./gradlew build --stacktrace --no-daemon | |
| - name: Setting mod version | |
| run: | | |
| cat $GITHUB_WORKSPACE/gradle.properties | grep ^archives_base_name= >> $GITHUB_ENV | |
| cat $GITHUB_WORKSPACE/gradle.properties | grep ^minecraft_version= >> $GITHUB_ENV | |
| cat $GITHUB_WORKSPACE/gradle.properties | grep ^base_version= >> $GITHUB_ENV | |
| - name: Create package name | |
| run: echo "package_name=[$minecraft_version] $archives_base_name-$base_version.${{ github.run_number }}" >> $GITHUB_ENV | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.package_name }} | |
| path: | | |
| **/build/libs/ | |
| !build/libs/ | |
| !**/*-dev.jar | |
| !**/*-shadow.jar | |
| !**/*-transformProduction*.jar | |
| !**/testmod*/ | |
| - name: Release to Maven and CurseForge | |
| if: | | |
| !contains(github.event.head_commit.message, '[norelease]') && | |
| github.event.inputs.norelease != 'true' | |
| env: | |
| MAVEN_PASS: ${{ secrets.MAVEN_PASS }} | |
| CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }} | |
| MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
| run: | | |
| ./gradlew publish publishUnified --stacktrace --no-daemon |