Skip to content

Commit

Permalink
Merge branch 'refs/heads/1.20.3' into 1.20.1-new
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Apr 23, 2024
2 parents 85206ad + 307f6e9 commit 9d515d4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: build-release
# This workflow will build a Java project with Brachyra
# For more information see: docs/development/brachyura.md

on:
release:
types:
- published
name: Java CI with Gradle

on: [ push, pull_request ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
- uses: actions/checkout@v2

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache Brachyura directory
uses: actions/cache@v2
distribution: temurin
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
path: |
.brachyura
~/.brachyura
key: ${{ runner.os }}-brachyura-${{ hashFiles('**/Buildscript.java') }}
restore-keys: ${{ runner.os }}-brachyura
cache-read-only: false

- name: Build with Brachyura
run: java -Diris.release=true -jar brachyura-bootstrap-0.jar build
- name: Run build with Gradle Wrapper
run: ./gradlew build -Dbuild.release=true

- name: Upload artifacts to Modrinth and GitHub
uses: Kir-Antipov/[email protected]
with:
modrinth-id: YL57xq9U
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: false
modrinth-featured: true

curseforge-id: 455508
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ tasks.withType<JavaCompile> {
fun createVersionString(): String {
val builder = StringBuilder()

val isReleaseBuild = project.hasProperty("build.release")
val isReleaseBuild = System.getProperty("build.release") != null
val buildId = System.getenv("GITHUB_RUN_NUMBER")

if (isReleaseBuild) {
Expand All @@ -226,13 +226,13 @@ fun createVersionString(): String {
builder.append("-snapshot")
}

val open = Grgit.open {
dir = rootDir
}

builder.append("+mc").append(Constants.MINECRAFT_VERSION)

if (!isReleaseBuild) {
val open = Grgit.open {
dir = rootDir
}

if (buildId != null) {
builder.append("-build.${buildId}")
} else if (open == null) {
Expand Down

0 comments on commit 9d515d4

Please sign in to comment.