Skip to content

Commit

Permalink
change: Fix publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed Aug 24, 2024
1 parent 9835c44 commit 60bf17b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 38 deletions.
60 changes: 31 additions & 29 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,33 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
${{ github.workspace }}/neoforge/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
${{ github.workspace }}/neoforge/build/libs/*-@(dev|sources|javadoc|dev-shadow).jar
${{ github.workspace }}/fabric/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
${{ github.workspace }}/fabric/build/libs/*-@(dev|sources|javadoc|dev-shadow).jar
publish:
needs: build
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- platform: fabric
name: Fabric
- platform: neoforge
name: NeoForge
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v3
- name: Publish Fabric to Modrinth, CurseForge & GitHub
uses: Kir-Antipov/[email protected]
with:
name: build-artifacts
- name: Publish ${{ matrix.name }} to Modrinth, CurseForge & GitHub
modrinth-id: PtjYWJkn
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

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

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

name: '[Fabric] ${{ github.event.release.name }}'
version: '${{ github.event.release.tag_name }}+fabric'
version-type: release

loaders: fabric

dependencies: |
sodium
reeses-sodium-options(optional)
irisshaders(optional)
iris(optional)
files: |
fabric/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
fabric/build/libs/*-@(dev|sources|javadoc|dev-shadow).jar
- name: Publish NeoForge to Modrinth, CurseForge & GitHub
uses: Kir-Antipov/[email protected]
with:
modrinth-id: PtjYWJkn
Expand All @@ -60,11 +62,11 @@ jobs:

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

name: '[${{ matrix.name }}] ${{ github.event.release.name }}'
version: '${{ github.event.release.tag_name }}+${{ matrix.platform }}'
name: '[NeoForge] ${{ github.event.release.name }}'
version: '${{ github.event.release.tag_name }}+neoforge'
version-type: release

loaders: ${{ matrix.platform }}
loaders: neoforge

dependencies: |
sodium
Expand All @@ -73,5 +75,5 @@ jobs:
iris(optional)
files: |
${{ github.workspace }}/${{ matrix.platform }}/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
${{ github.workspace }}/${{ matrix.platform }}/build/libs/*-@(dev|sources|javadoc|dev-shadow).jar
neoforge/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
neoforge/build/libs/*-@(dev|sources|javadoc|dev-shadow).jar
5 changes: 1 addition & 4 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ dependencies {
addDependentFabricModule("fabric-renderer-api-v1")
addDependentFabricModule("fabric-rendering-data-attachment-v1")

modCompileOnly("net.fabricmc.fabric-api:fabric-renderer-api-v1:3.2.9+1172e897d7")
implementation(group = "com.lodborg", name = "interval-tree", version = "1.0.0")

modImplementation(/*files(rootDir.resolve("sodium-fabric.jar"))*/ "maven.modrinth:sodium:mc1.21-0.6.0-beta.1-fabric")
modImplementation("maven.modrinth:sodium:mc1.21-0.6.0-beta.1-fabric")
}

tasks.withType<AbstractRemapJarTask>().forEach {
Expand Down
5 changes: 1 addition & 4 deletions fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ dependencies {
addEmbeddedFabricModule("fabric-rendering-data-attachment-v1")
addEmbeddedFabricModule("fabric-rendering-fluids-v1")
addEmbeddedFabricModule("fabric-resource-loader-v0")
include(implementation(group = "com.lodborg", name = "interval-tree", version = "1.0.0"))

implementation("com.google.code.findbugs:jsr305:3.0.1")
compileOnly(project(":common"))
modImplementation(/*files(rootDir.resolve("sodium-fabric.jar"))*/ "maven.modrinth:sodium:mc1.21-0.6.0-beta.1-fabric")
modImplementation("maven.modrinth:sodium:mc1.21-0.6.0-beta.1-fabric")

}

Expand Down
2 changes: 1 addition & 1 deletion neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ tasks.named("compileTestJava").configure {

dependencies {
compileOnly(project(":common"))
implementation(/*files(rootDir.resolve("sodium-neo.jar"))*/ "maven.modrinth:sodium:mc1.21-0.6.0-beta.1-neoforge")
implementation("maven.modrinth:sodium:mc1.21-0.6.0-beta.1-neoforge")
}

// NeoGradle compiles the game, but we don't want to add our common code to the game's code
Expand Down

0 comments on commit 60bf17b

Please sign in to comment.