Skip to content

Commit

Permalink
Merge branch 'master' into port-1.19.2
Browse files Browse the repository at this point in the history
  • Loading branch information
der-fruhling committed May 22, 2024
2 parents 254610f + 358578a commit 7c711bd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 30 deletions.
46 changes: 18 additions & 28 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ on:
default: "port-1.19.2"
description: The 1.19.2 version of the mod
required: true
publish-ghp:
default: true
description: Publish to GitHub packages
required: true
type: boolean
publish-modrinth:
default: true
description: Publish to Modrinth
required: true
type: boolean

jobs:
build:
Expand Down Expand Up @@ -51,29 +61,14 @@ jobs:
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Build with Gradle
run: ./gradlew build
- name: Upload Forge artifact
uses: actions/upload-artifact@v4
with:
name: create-train-perspective-${{ inputs.version }}-forge${{ matrix.version }}.jar
path: forge/build/libs/create-train-perspective-0.4.0.jar
if-no-files-found: error
compression: 0
overwrite: true
- name: Upload Fabric artifact
uses: actions/upload-artifact@v4
with:
name: create-train-perspective-${{ inputs.version }}-fabric${{ matrix.version }}.jar
path: fabric/build/libs/create-train-perspective-0.4.0.jar
if-no-files-found: error
compression: 0
overwrite: true

publish-ghp:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: build
if: inputs.publish-ghp
strategy:
matrix:
include:
Expand Down Expand Up @@ -111,17 +106,12 @@ jobs:
permissions:
contents: read
needs: build
if: inputs.publish-modrinth
strategy:
matrix:
include:
- branch: ${{ inputs.master-ref }}
loader: forge
- branch: ${{ inputs.master-ref }}
loader: fabric
- branch: ${{ inputs.port-19-ref }}
loader: forge
- branch: ${{ inputs.port-19-ref }}
loader: fabric
branch:
- ${{ inputs.master-ref }}
- ${{ inputs.port-19-ref }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -138,7 +128,7 @@ jobs:

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
run: ./gradlew :${{ matrix.loader }}:modrinth
- name: Publish to Modrinth
run: ./gradlew modrinth
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ allprojects {
archivesName = rootProject.archives_base_name
}

version = rootProject.mod_version
group = rootProject.maven_group
version = rootProject.version
group = rootProject.group

repositories {
maven { url = 'https://maven.tterrag.com/' }
Expand Down

0 comments on commit 7c711bd

Please sign in to comment.