Skip to content

Fog 1.6.0

Fog 1.6.0 #26

Workflow file for this run

name: Distribute JARs
on:
release:
types: [published]
jobs:
build:
runs-on: "ubuntu-latest"
strategy:
matrix:
gradle-version: ["wrapper"]
gradle-command: ["./gradlew"]
include:
- gradle-version: "wrapper"
gradle-command: "./gradlew"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 21
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ matrix.gradle-version }}
- name: Build JARs
uses: Wandalen/wretry.action@master
with:
command: "${{ matrix.gradle-command }} chiseledBuild"
attempt_limit: 3
- name: Upload Built JARs
uses: actions/upload-artifact@v4
with:
name: built-jars
path: |
./versions/**/build/libs/*.jar
distribute:
needs: build
runs-on: "ubuntu-latest"
strategy:
matrix:
# REMINDER: Update this array when adding new game versions.
game_version:
[
"1.21-fabric",
"1.21-neoforge",
"1.21.3-fabric",
"1.21.3-neoforge",
]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Built JARs
uses: actions/download-artifact@v4
with:
name: built-jars
path: ./versions
- name: Publish to Modrinth, CurseForge, etc.
uses: Kir-Antipov/mc-publish@v3.3
with:
files: |
versions/${{ matrix.game_version }}/build/libs/!(*-@(dev|sources|javadoc)).jar
versions/${{ matrix.game_version }}/build/libs/*-@(dev|sources|javadoc).jar
version: ${{ github.ref_name }}+${{ matrix.game_version }}
modrinth-id: ${{ vars.MODRINTH_ID }}
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: ${{ vars.CURSEFORGE_ID }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
github-token: ${{ secrets.CLASSIC_GITHUB_TOKEN }}