Skip to content

Commit

Permalink
feat: Include Modrinth uploads (#950)
Browse files Browse the repository at this point in the history
* Update build_and_publish.yaml

Include Modrinth uploads

* Update build.gradle for new action workflow

* Update build_and_publish.yaml

---------

Co-authored-by: Kli Kli <[email protected]>
  • Loading branch information
ColonelGerdauf and klikli-dev authored Jul 13, 2023
1 parent 5a5ea27 commit 68c16cf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
38 changes: 25 additions & 13 deletions .github/workflows/build_and_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,33 @@ jobs:
branch: version/1.18
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md
- name: Upload to Curseforge
id: curseforge
- name: Upload to Mod Platforms
uses: itsmeow/curseforge-upload@master
if: ${{ steps.get_release_type.outputs.result != 'test' }}
with:
token: ${{ secrets.CURSEFORGE_API_KEY }}
project_id: 361026
game_endpoint: minecraft
file_path: ./build/libs/occultism-${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}.jar
modrinth-id: sbJh4AZw
modrinth-token: ${{ secrets.MODRINTH_API_KEY }}
curseforge-id: 361026
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }}

files: |
build/libs/occultism-${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}.jar
name: occultism-${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}.jar
version: ${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}
version-type: ${{ steps.get_release_type.outputs.result }}
game-versions: |
${{ steps.get_mc_version.outputs.result }}
changelog: |-
[Changelog]
${{ steps.changelog.outputs.changes }}
Find changes for all versions at https://github.com/klikli-dev/occultism/releases
game_versions: Forge,Minecraft 1.18:${{ steps.get_mc_version.outputs.result }}
display_name: occultism-${{ steps.get_mc_version.outputs.result }}-${{ steps.get_version.outputs.result }}.jar
release_type: ${{ steps.get_release_type.outputs.result }}
relations: modonomicon:requiredDependency,curios:requiredDependency,geckolib:requiredDependency,smartbrainlib:requiredDependency,theurgy:optionalDependency,jei:optionalDependency,almost-unified:optionalDependency
dependencies: |
forge(required)
modonomicon(required)
curios(required)
geckolib(required)
smartbrainlib(required)
theurgy(optional)
jei(optional)
almost-unified(optional)
perviaminvenire(optional)
12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'idea'
apply plugin: 'maven-publish'

if (System.getenv('VERSION') != null) {
version = System.getenv('VERSION')
} else {
version = "${mc_version}-${mod_version}"
if (System.getenv('MOD_VERSION') != null) {
mod_version = System.getenv('MOD_VERSION')
}
if (System.getenv('MINECRAFT_VERSION') != null) {
mc_version = System.getenv('MINECRAFT_VERSION')
}
version = "${mc_version}-${mod_version}"

group = "com.github.klikli_dev"
archivesBaseName = "occultism"
Expand Down Expand Up @@ -245,4 +247,4 @@ tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

processResources.setDuplicatesStrategy(DuplicatesStrategy.WARN)
processResources.setDuplicatesStrategy(DuplicatesStrategy.WARN)

0 comments on commit 68c16cf

Please sign in to comment.