Skip to content

Commit

Permalink
Fix Modrinth README syncing.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Dec 3, 2024
1 parent 5c9198b commit 6c36ce7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/sync_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Sync README"

on: workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set up Java"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 21
- name: "Set up Gradle"
uses: gradle/actions/setup-gradle@v3

- name: "Build with Gradle"
run: ./gradlew build modrinthSyncBody --parallel --stacktrace
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
2 changes: 1 addition & 1 deletion build_logic/src/main/kotlin/lambdynamiclights/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.gradle.api.Project

object Utils {
fun parseReadme(project: Project): String {
val linkRegex = "!\\[([A-z_ ]+)]\\((assets\\/[A-z.\\/_]+)\\)"
val linkRegex = "!\\[(.+?)]\\((assets\\/[A-z.\\/_]+)\\)"

var readme = project.rootProject.file("README.md").readText()
val lines = readme.split("\n").toMutableList()
Expand Down

0 comments on commit 6c36ce7

Please sign in to comment.