Skip to content

Publish

Publish #163

Workflow file for this run

name: Publish
on:
workflow_dispatch:
inputs:
mod_version:
description: 'Mod Version'
default: '1.20.0'
required: true
env:
MOD_VERSION: ${{ inputs.mod_version }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: crowdin action
uses: crowdin/github-action@v2
with:
push_sources: false
upload_sources: false
push_translations: false
upload_translations: false
download_translations: true
create_pull_request: false
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
- name: Set mod_version
run: sed -i -E "s/(mod_version\s*=\s*).+/\1${{ env.MOD_VERSION }}/" gradle.properties
- name: Build with Gradle
run: ./gradlew build
- name: Tag release on GitHub
uses: Kir-Antipov/mc-publish@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
files: LICENSE
name: 1.19.4-${{ env.MOD_VERSION }}
version: 1.19.4-${{ env.MOD_VERSION }}
github-tag: 1.19.4-${{ env.MOD_VERSION }}
github-commitish: ${{ github.sha }}
github-generate-changelog: true
- name: Publish Forge build to CurseForge and Modrinth
uses: Kir-Antipov/mc-publish@v3
with:
modrinth-id: MCF15nCy
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 1033985
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
files: |
forge/build/libs/*-${{ env.MOD_VERSION }}.jar
name: Forge-1.19.4-${{ env.MOD_VERSION }}
version: Forge-1.19.4-${{ env.MOD_VERSION }}
changelog: |
Full changelog can be found on [GitHub](https://github.com/ThexXTURBOXx/Balkons-WeaponMod-Legacy/releases)
loaders: forge
game-versions: 1.19.4
java: 17
dependencies: |
architectury-api(required){modrinth:lhGA9TYQ}{curseforge:419699}#(ignore:github)
cloth-config(required){modrinth:9s6osm5g}{curseforge:348521}#(ignore:github)
- name: Publish Fabric build to CurseForge and Modrinth
uses: Kir-Antipov/mc-publish@v3
with:
modrinth-id: MCF15nCy
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 1033985
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
files: |
fabric/build/libs/*-${{ env.MOD_VERSION }}.jar
name: Fabric-1.19.4-${{ env.MOD_VERSION }}
version: Fabric-1.19.4-${{ env.MOD_VERSION }}
changelog: |
Full changelog can be found on [GitHub](https://github.com/ThexXTURBOXx/Balkons-WeaponMod-Legacy/releases)
loaders: |
fabric
quilt
game-versions: 1.19.4
java: 17
dependencies: |
architectury-api(required){modrinth:lhGA9TYQ}{curseforge:419699}#(ignore:github)
cloth-config(required){modrinth:9s6osm5g}{curseforge:348521}#(ignore:github)
fabric(required){modrinth:P7dR8mSH}{curseforge:306612}#(ignore:github)
qsl(optional){modrinth:qvIfYCYJ}{curseforge:634179}#(ignore:github)