[Compat] Rats compatibility #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish on GitHub, CurseForge & Modrinth #The name of your GitHub Action on github.com | |
on: [ pull_request, workflow_dispatch ] #When your GitHub Action will be executed ('pull_request' -> on every Merge(/Pull) Request; 'workflow_dispatch' -> allows manual execution through github.com | |
env: #Environment variables that can later be referenced using ${{ env.MINECRAFT_VERSION }}. These are useful for repeating information and allow for quick changes for new mod updates | |
MINECRAFT_VERSION: 1.20.1 | |
JAVA_VERSION: 17 | |
VERSION: 3.3.2+1.20 | |
RELEASE_NAME: "[Universal]CTOVv3.3.2+1.20" | |
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }} | |
CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }} | |
permissions: | |
contents: write | |
jobs: #The place where you actually tell the GitHub server what to do. | |
build: #To publish your mod you only need one 'job', here it is called 'build'. | |
runs-on: windows #'runs-on' specifies the operation system (linux). #Under 'steps' you will list all the individual commands, such as MC-Publish by Kir-Antipov. | |
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: Make Gradle Wrapper Executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Build | |
run: ./gradlew clean build | |
- name: Publish (CurseForge/Modrinth/GitHub) | |
uses: Kir-Antipov/[email protected] #The specified MC-Publish GitHub Action in the version 3.2 | |
with: | |
curseforge-id: 623908 #The id of your CurseForge project | |
curseforge-token: "${{env.CURSEFORGE_TOKEN}}" | |
modrinth-id: fgmhI8kH #The id of your modrinth project | |
modrinth-token: "${{env.MODRINTH_TOKEN}}" | |
github-tag: "v${{env.VERSION}}" | |
github-token: "${{env.GITHUB_TOKEN}}" | |
name: "${{env.RELEASE_NAME}}" | |
version: "${{env.VERSION}}" | |
version-type: release | |
changelog-file: CHANGELOG.md #The file in which the changes of your new update are specified (the path starts at your project root) | |
loaders: fabric, forge | |
game-versions: "${{env.MINECRAFT_VERSION}}" | |
java: "${{env.JAVA_VERSION}}" |