Skip to content

Publish 1.20.1 on GitHub, CurseForge & Modrinth #26

Publish 1.20.1 on GitHub, CurseForge & Modrinth

Publish 1.20.1 on GitHub, CurseForge & Modrinth #26

name: Publish 1.20.1 on GitHub, CurseForge & Modrinth
on: [ workflow_dispatch ]
env:
JAVA_VERSION: 17
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}
CURSEFORGE_ID: 1027757
MODRINTH_ID: nR8D9Tc2
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: 17
- name: Read mod_version from gradle.properties
id: read_mod_version
run: |
MOD_VERSION=$(grep 'mod_version' gradle.properties | cut -d'=' -f2)
echo "VERSION=$MOD_VERSION" >> $GITHUB_ENV
MINECRAFT_VERSION=$(grep 'minecraft_version' gradle.properties | cut -d'=' -f2)
echo "MINECRAFT_VERSION=$MINECRAFT_VERSION" >> $GITHUB_ENV
- name: Download CBC common
uses: Fork-on-the-Table-Collective/[email protected]
with:
credentials: ${{ secrets.GSA_CREDENTIALS }}
actionType: download
localPath: ./common/jars/createbigcannons-5.5.0-dev+mc.1.20.1-fabric-build.50.jar
googleFileId: 1Nj1TlU_PC_mZuEj6e5lCR3EwRTitOxt-
- name: Download CBC fabric
uses: Fork-on-the-Table-Collective/[email protected]
with:
credentials: ${{ secrets.GSA_CREDENTIALS }}
actionType: download
localPath: ./fabric/jars/createbigcannons-5.5.0-dev+mc.1.20.1-fabric-build.50.jar
googleFileId: 1Nj1TlU_PC_mZuEj6e5lCR3EwRTitOxt-
- name: Download CBC forge
uses: Fork-on-the-Table-Collective/[email protected]
with:
credentials: ${{ secrets.GSA_CREDENTIALS }}
actionType: download
localPath: ./forge/jars/createbigcannons-5.5.0-dev+mc.1.20.1-forge-build.50.jar
googleFileId: 1jKit9IvnzyucbGzooDP0tPWUAux6NYsl
- name: Download Modern Warfare
uses: Fork-on-the-Table-Collective/[email protected]
with:
credentials: ${{ secrets.GSA_CREDENTIALS }}
actionType: download
localPath: ./forge/jars/cbcmodernwarfare-0.0.5b+mc.1.20.1-forge.jar
googleFileId: 1wBoucGOURq5dkLx1IvQ_DP29uxB7iQd8
- name: Download FTB Chunks
uses: Fork-on-the-Table-Collective/[email protected]
with:
credentials: ${{ secrets.GSA_CREDENTIALS }}
actionType: download
localPath: ./common/jars/ftb-chunks-fabric-2001.3.1.jar
googleFileId: 1syotEGMA2svNL2vaXp35yF7fD9NyDmZp
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build
run: ./gradlew clean build
- name: Publish Fabric (CurseForge/Modrinth/GitHub)
uses: Kir-Antipov/[email protected]
with:
curseforge-id: ${{env.CURSEFORGE_ID}}
curseforge-token: "${{env.CURSEFORGE_TOKEN}}"
modrinth-id: ${{env.MODRINTH_ID}}
modrinth-token: "${{env.MODRINTH_TOKEN}}"
github-tag: "v${{env.MINECRAFT_VERSION}}-fabric-{{env.VERSION}}"
github-token: "${{env.GITHUB_TOKEN}}"
name: "[${{env.MINECRAFT_VERSION}} Fabric] ${{env.VERSION}}"
version: "${{env.VERSION}}"
version-type: beta
changelog-file: CHANGELOG.md
files: |
fabric/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
loaders: fabric
game-versions: "${{env.MINECRAFT_VERSION}}"
java: "${{env.JAVA_VERSION}}"
- name: Publish Forge (CurseForge/Modrinth/GitHub)
uses: Kir-Antipov/[email protected]
with:
curseforge-id: ${{env.CURSEFORGE_ID}}
curseforge-token: "${{env.CURSEFORGE_TOKEN}}"
modrinth-id: ${{env.MODRINTH_ID}}
modrinth-token: "${{env.MODRINTH_TOKEN}}"
github-tag: "${{env.MINECRAFT_VERSION}}-forge-{{env.VERSION}}"
github-token: "${{env.GITHUB_TOKEN}}"
name: "[${{env.MINECRAFT_VERSION}} Forge] ${{env.VERSION}}"
version: "${{env.VERSION}}"
version-type: beta
changelog-file: CHANGELOG.md
files: |
forge/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
loaders: forge
game-versions: "${{env.MINECRAFT_VERSION}}"
java: "${{env.JAVA_VERSION}}"