Skip to content

Pubish mod

Pubish mod #45

Workflow file for this run

name: Pubish mod
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '21'
- name: Make Gradle wrapper executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew --max-workers 1 build -x :Common:compileJava
- name: Collect version information
run: |
set_var() {
echo $1="$2"
echo $1="$2" >> $GITHUB_ENV
declare -g $1="$2"
}
set_var JAR_FILE $(eval echo fabric/build/libs/ExtremeSoundMuffler-*-*-*.jar)
set_var MOD_VERSION $(echo ${JAR_FILE%.*} | cut -d- -f2)
- name: Publish Minecraft Mods Forge Edition
uses: Kir-Antipov/mc-publish@v3.3
with:
files: forge/build/libs/!(*-@(dev|sources|javadoc)).jar
modrinth-id: 5IIKsxiL
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 363363
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
name: Extreme sound muffler ${{env.MOD_VERSION}} - Forge ${{github.ref_name}}
loaders: forge
game-versions: ${{github.ref_name}}
version: ${{env.MOD_VERSION}}-${{github.ref_name}}
java: Java 17
modrinth-featured: false
changelog-file: CHANGELOG.md
- name: Publish Minecraft Mods Fabric Edition
uses: Kir-Antipov/mc-publish@v3.3
with:
files: fabric/build/libs/!(*-@(dev|sources|javadoc)).jar
modrinth-id: 5IIKsxiL
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 566140
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
name: Extreme sound muffler ${{env.MOD_VERSION}} - Fabric ${{github.ref_name}}
loaders: fabric
game-versions: ${{github.ref_name}}
version: ${{env.MOD_VERSION}}-${{github.ref_name}}
java: Java 17
modrinth-featured: false
changelog-file: CHANGELOG.md
- name: Cleanup Gradle Cache
run: ./gradlew --stop |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties