build: 用 Stratum 项目模式发布到 Nexus(版本可排序) #7
No files matched your search
@@ -22,12 +22,17 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
# Organisation-wide Stratum settings (registry, group, runner routes) are organisation variables.
|
||||
env:
|
||||
STRATUM_PUBLISH_URL: ${{ vars.STRATUM_PUBLISH_URL }}
|
||||
STRATUM_RESOLVE_URL: ${{ vars.STRATUM_RESOLVE_URL }}
|
||||
STRATUM_GROUP_ID: ${{ vars.STRATUM_GROUP_ID }}
|
||||
STRATUM_ROUTES: ${{ vars.STRATUM_ROUTES }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
ARTIFACT_GROUP_ID: uk.potatolab
|
||||
steps:
|
||||
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
|
||||
with:
|
||||
@@ -60,11 +65,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
ARTIFACT_GROUP_ID: uk.potatolab
|
||||
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||
ORG_GRADLE_PROJECT_tdlmUsername: ${{ secrets.MAVEN_USER }}
|
||||
ORG_GRADLE_PROJECT_tdlmPassword: ${{ secrets.MAVEN_PASSWORD }}
|
||||
steps:
|
||||
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
|
||||
with:
|
||||
|
||||
+1
-27
@@ -1,30 +1,4 @@
|
||||
plugins { id 'com.gtnewhorizons.gtnhconvention' }
|
||||
|
||||
def gitCommit = providers.exec {
|
||||
commandLine 'git', 'rev-parse', '--short=7', 'HEAD'
|
||||
}.standardOutput.asText.get().trim()
|
||||
version = providers.gradleProperty('modVersion').get()
|
||||
|
||||
group = 'uk.potatolab'
|
||||
version = "${providers.gradleProperty('modVersion').get()}-${gitCommit}"
|
||||
|
||||
afterEvaluate {
|
||||
publishing.publications.named('maven', MavenPublication) {
|
||||
groupId = project.group
|
||||
artifactId = 'thaumicadditions'
|
||||
version = project.version
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = 'TDLM Maven'
|
||||
url = 'https://git.nest.potatolab.uk:8443/api/packages/TDLM/maven'
|
||||
content { includeGroup "uk.potatolab" }
|
||||
if (System.getenv('MAVEN_USER') && System.getenv('MAVEN_PASSWORD')) {
|
||||
credentials {
|
||||
username = System.getenv('MAVEN_USER')
|
||||
password = System.getenv('MAVEN_PASSWORD')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-9
@@ -1,20 +1,16 @@
|
||||
repositories {
|
||||
mavenLocal()
|
||||
}
|
||||
def tdlmDependencyVersion = { String artifact, String fallback ->
|
||||
project.findProperty('tdlm.dependency.' + artifact.toLowerCase() + '.version') ?: fallback
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
// Thaumcraft 4 full dev jar (api + common impl; the sources import thaumcraft.common.* and thaumcraft.client.*)
|
||||
api("uk.potatolab:Thaumcraft4:${tdlmDependencyVersion('Thaumcraft4', '1.7.10-4.2.3.5-d3ece2a')}")
|
||||
api("uk.potatolab:Thaumcraft4:1.7.10-4.2.3.5-d3ece2a")
|
||||
// cofh.api.energy.IEnergyReceiver is used by TileThaumicGenerator (the CoFH API lives in CoFHLib, not CoFHCore)
|
||||
compileOnly("uk.potatolab:CoFHLib-1.7.10-Legacy:${tdlmDependencyVersion('CoFHLib-1.7.10-Legacy', '1.7.10R3.0.3-6ab2b0e')}")
|
||||
compileOnly("uk.potatolab:CoFHLib-1.7.10-Legacy:1.7.10R3.0.3-6ab2b0e")
|
||||
// Botania API (com.pengu.thaumcraft.additions.api.others.Botania)
|
||||
compileOnly("uk.potatolab:Botania:${tdlmDependencyVersion('Botania', '1.13.36-GTNH-722cecf')}:dev") { transitive = false }
|
||||
compileOnly("uk.potatolab:Botania:1.13.36-GTNH-722cecf:dev") { transitive = false }
|
||||
// Waila API (com.pengu.thaumcraft.additions.api.others.WAILA)
|
||||
compileOnly("uk.potatolab:Waila:${tdlmDependencyVersion('Waila', '1.19.30-5462a91')}:api") { transitive = false }
|
||||
compileOnly("uk.potatolab:Waila:1.19.30-5462a91:api") { transitive = false }
|
||||
// Baubles is required at runtime (see the @Mod dependencies string); no compile-time import
|
||||
runtimeOnly("uk.potatolab:Baubles-Expanded:${tdlmDependencyVersion('Baubles-Expanded', '44bd380')}")
|
||||
runtimeOnly("uk.potatolab:Baubles-Expanded:44bd380")
|
||||
}
|
||||
@@ -12,4 +12,3 @@ disableSpotless = true
|
||||
disableCheckstyle = true
|
||||
org.gradle.jvmargs = -Xmx2G
|
||||
usesMavenPublishing = true
|
||||
mavenPublishUrl = https://git.nest.potatolab.uk:8443/api/packages/TDLM/maven
|
||||
+11
-1
@@ -1,5 +1,7 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
// The organisation's registry (Stratum): stratum.resolveUrl in ~/.gradle/gradle.properties, or STRATUM_RESOLVE_URL in CI.
|
||||
maven { url = providers.gradleProperty('stratum.resolveUrl').orElse(providers.environmentVariable('STRATUM_RESOLVE_URL')).get() }
|
||||
maven {
|
||||
name "GTNH Maven"
|
||||
url "https://nexus.gtnewhorizons.com/repository/public/"
|
||||
@@ -13,6 +15,14 @@ pluginManagement {
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
plugins { id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.29' }
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.29'
|
||||
id 'uk.potatolab.stratum' version '1.0.0-20261028.100932-g18e54b5'
|
||||
}
|
||||
|
||||
rootProject.name = 'thaumicadditions'
|
||||
|
||||
// Published as uk.potatolab:ThaumicAdditions:<version>-<commit time>-g<sha>, to the organisation's registry.
|
||||
stratum {
|
||||
artifactId = 'ThaumicAdditions'
|
||||
}
|
||||
Reference in new issue
Block a user