Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiversion support #13

Merged
merged 1 commit into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 31 additions & 24 deletions .github/workflows/build-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,45 @@
# This makes use of caching for faster builds and uploads the resulting artifacts
name: build-commit

on: [ push ]
on:
push:
paths-ignore:
- "readme.md"
- "LICENSE"
- ".gitignore"
- "changelog.md"
- ".editorconfig"
- "src/*/resources/lang/*"
pull_request:
paths-ignore:
- "readme.md"
- "LICENSE"
- ".gitignore"
- "changelog.md"
- ".editorconfig"
- "src/*/resources/lang/*"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
name: Build with Gradle

steps:
- name: Extract current branch name
shell: bash
# bash pattern expansion to grab branch name without slashes
run: ref="${GITHUB_REF#refs/heads/}" && echo "branch=${ref////-}" >> $GITHUB_OUTPUT
id: ref
- name: Checkout sources
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Initialize caches
uses: actions/cache@v4
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
uses: Wandalen/wretry.action@master
with:
path: |
~/.gradle/caches
~/.gradle/loom-cache
~/.gradle/wrapper
key: ${{ runner.os }}-build-commit-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-build-commit-
- name: Build artifacts
run: ./gradlew build
- name: Upload artifacts
uses: actions/upload-artifact@v4
command: ./gradlew buildAllVersions --stacktrace
- uses: actions/upload-artifact@v4
with:
name: telekinesis-artifacts-${{ steps.ref.outputs.branch }}
path: build/libs/*.jar
path: versions/**/build/libs/*.jar
29 changes: 0 additions & 29 deletions .github/workflows/build-pull-request.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/ktlint-commit.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/ktlint-pull-request.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: release

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
name: Release
permissions: write-all

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Release with Gradle
uses: Wandalen/wretry.action@master
with:
command: ./gradlew releaseAllVersions --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_API_KEY: ${{ secrets.MODRINTH_API_KEY }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
NYON_USERNAME: ${{ secrets.NYON_USERNAME }}
NYON_PASSWORD: ${{ secrets.NYON_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SECRET_KEY_PASSWORD }}
GPG_SECRET_KEY_ID: ${{ secrets.GPG_SECRET_KEY_ID }}
11 changes: 7 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
plugins {
kotlin("jvm") version "1.9.23"
kotlin("plugin.serialization") version "1.9.23"
id("com.modrinth.minotaur") version "2.8.7" apply (false)
id("com.github.breadmoirai.github-release") version "2.5.2" apply (false)
kotlin("jvm") version "1.9.24"
kotlin("plugin.serialization") version "1.9.24"

id("me.modmuss50.mod-publish-plugin") version "0.5.+"

id("fabric-loom") version "1.6-SNAPSHOT" apply (false)

id("io.papermc.paperweight.userdev") version "1.5.5" apply (false)

`maven-publish`
signing
}

repositories {
Expand Down
3 changes: 1 addition & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
- update to 1.20.5
- no config screen cause of yacl at the moment
- support 1.20.1, 1.20.4, 1.20.6
19 changes: 18 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import dev.kikugie.stonecutter.gradle.StonecutterSettings

rootProject.name = "telekinesis"

pluginManagement {
Expand All @@ -7,8 +9,23 @@ pluginManagement {
maven("https://server.bbkr.space/artifactory/libs-release/")
maven("https://maven.quiltmc.org/repository/release/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://maven.kikugie.dev/releases")
}
}

plugins {
id("dev.kikugie.stonecutter") version "0.3.5"
}

//include("telekinesis-paper")
include("telekinesis-fabric")
include("telekinesis-fabric")

extensions.configure<StonecutterSettings> {
kotlinController = true
centralScript = "build.gradle.kts"
shared {
versions("1.20.1", "1.20.4", "1.20.6")
vcsVersion = "1.20.6"
}
create(project(":telekinesis-fabric"))
}
Loading
Loading