Skip to content

Publish on GitHub, Modrinth, CurseForge #4

Publish on GitHub, Modrinth, CurseForge

Publish on GitHub, Modrinth, CurseForge #4

Workflow file for this run

name: Publish on GitHub, Modrinth, CurseForge
on: [ workflow_dispatch ]
env:
MINECRAFT_VERSION: 1.21
JAVA_VERSION: 21
VERSION: 0.1.1
VERSION_TYPE: release
PUBLISH_GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}
PUBLISH_MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
PUBLISH_CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }}
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Environment Variables
run: env
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "${{env.JAVA_VERSION}}"
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build
run: ./gradlew clean build
- name: Publish (Fabric)
uses: Kir-Antipov/[email protected]
with:
github-tag: "v${{env.VERSION}}"
github-generate-changelog: false
github-draft: false
github-prerelease: false
github-token: "${{env.PUBLISH_GITHUB_TOKEN}}"
modrinth-id: g8vH5XKK
modrinth-featured: false
modrinth-token: "${{env.PUBLISH_MODRINTH_TOKEN}}"
curseforge-id: 1093054
curseforge-token: "${{env.PUBLISH_CURSEFORGE_TOKEN}}"
name: "Automated Workstations - v${{env.VERSION}} - Fabric - ${{env.MINECRAFT_VERSION}}"
version: "${{env.VERSION}}"
version-type: "${{env.VERSION_TYPE}}"
changelog-file: CHANGELOG.md
game-version-filter: releases
loaders: fabric
files: "fabric/build/libs/automatedworkstations-fabric-${{env.MINECRAFT_VERSION}}-${{env.VERSION}}.jar"
- name: Publish (Neoforge)
uses: Kir-Antipov/[email protected]
with:
github-tag: "v${{env.VERSION}}"
github-generate-changelog: false
github-draft: false
github-prerelease: false
github-token: "${{env.PUBLISH_GITHUB_TOKEN}}"
modrinth-id: g8vH5XKK
modrinth-featured: false
modrinth-token: "${{env.PUBLISH_MODRINTH_TOKEN}}"
curseforge-id: 1093054
curseforge-token: "${{env.PUBLISH_CURSEFORGE_TOKEN}}"
name: "Automated Workstations - v${{env.VERSION}} - Neoforge - ${{env.MINECRAFT_VERSION}}"
version: "${{env.VERSION}}"
version-type: "${{env.VERSION_TYPE}}"
changelog-file: CHANGELOG.md
game-version-filter: releases
loaders: neoforge
files: "neoforge/build/libs/automatedworkstations-neoforge-${{env.MINECRAFT_VERSION}}-${{env.VERSION}}.jar"