Skip to content

Commit

Permalink
build: GHA publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Jul 23, 2023
1 parent 2ad2892 commit 020a7c5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
java-package: jdk
- name: build
run: ./gradlew build
# - name: upload to modrinth and curseforge
# run: ./gradlew modrinth curseforge
# if: github.ref == 'refs/heads/ver/1.19.2'
# env:
# MODRINTH_TOKEN: ${{ secrets.MODRINTH_UPLOAD_TOKEN }}
# CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}
# GITHUB_EVENT_RAW_PATH: ${{ github.event_path }}
# continue-on-error: true
- name: upload to modrinth and curseforge
run: ./gradlew modrinth curseforge
if: github.ref == 'refs/heads/ver/1.19.2'
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_UPLOAD_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}
GITHUB_EVENT_RAW_PATH: ${{ github.event_path }}
continue-on-error: true
- name: capture build artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -158,27 +158,27 @@ publishing {

modrinth {
token = System.getenv("MODRINTH_TOKEN") // This is the default. Remember to have the MODRINTH_TOKEN environment variable set or else this will fail, or set it to whatever you want - just make sure it stays private!
projectId = "vmp-fabric" // This can be the project ID or the slug. Either will work!
projectId = "vmp-forge" // This can be the project ID or the slug. Either will work!
versionNumber = project.version + "+" + project.minecraft_version // You don't need to set this manually. Will fail if Modrinth has this version already
versionName = project.version + " backport for " + project.minecraft_version
versionType = "alpha" // This is the default -- can also be `beta` or `alpha`
uploadFile = remapShadowJar // With Loom, this MUST be set to `remapJar` instead of `jar`!
gameVersions = [project.minecraft_version] // Must be an array, even with only one version
loaders = ["fabric"] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
loaders = ["forge"] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
changelog = com.ishland.vmp.buildscript.ParseGItHubActionChangelog.getChangelog()
}

if (System.getenv("CURSEFORGE_TOKEN")) {
curseforge {
apiKey = System.getenv("CURSEFORGE_TOKEN")
project {
id = '552542'
id = '892037'
changelogType = "markdown"
changelog = com.ishland.vmp.buildscript.ParseGItHubActionChangelog.getChangelog()
releaseType = 'alpha'

addGameVersion project.minecraft_version
addGameVersion "Fabric"
addGameVersion "Forge"
addGameVersion "Java 17"

mainArtifact(remapShadowJar) {
Expand Down

0 comments on commit 020a7c5

Please sign in to comment.