Skip to content

Added missing optional dependency on Modrinth #25

Added missing optional dependency on Modrinth

Added missing optional dependency on Modrinth #25

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Build and publish mod
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build with Gradle Wrapper
id: build
run: ./gradlew build
- name: Publish mod on CurseForge, Modrinth and Github (Optional)
if: ${{ steps.build.outputs.publish_mod == 'true' }}
uses: Kir-Antipov/[email protected]
with:
loaders: forge
name: ${{ steps.build.outputs.name }}
version: ${{ steps.build.outputs.version }}
version-type: ${{ steps.build.outputs.release_type }}
game-versions: 1.12.2
java: Java 1.8
changelog: ${{ github.event.head_commit.message }}
files: build/libs/!(*-@(dev|sources|all)).jar
dependencies: |
forgelin-continuous(required)
patchouli(required)
jei(optional)
crafttweaker(optional)
mtlib(optional)
max-potion-id-extender(optional)
# CurseForge publishing
curseforge-id: 322571
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
# Modrinth publishing
modrinth-id: rT6tg86B
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
# GitHub publishing
github-tag: ${{ steps.build.outputs.github_tag }}
github-generate-changelog: true
github-prerelease: false
github-token: ${{ secrets.GITHUB_TOKEN }}
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
#
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
# with:
# gradle-version: '8.5'
#
# - name: Build with Gradle 8.5
# run: gradle build
- name: Upload artifacts
if: ${{ steps.build.outputs.publish_mod != 'true' }} # Upload artifacts only in mod is not published
uses: actions/upload-artifact@v4
with:
name: divine-favor
path: build/libs/