every time... #153
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: CI | |
# Controls when the action will run. | |
on: [push, workflow_dispatch] | |
jobs: | |
buildCore: | |
name: Build Core | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup JDK | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: adopt | |
java-version: 8 | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v2 | |
# Build Core | |
- name: Build/Install Core | |
working-directory: ./MinecraftMod/core | |
run: './gradlew publishToMavenLocal' | |
# Upload Maven Local | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ~/.m2/repository | |
name: maven | |
buildJava8: | |
name: Build ${{ matrix.mod-loader }} ${{ matrix.mc-version }} | |
runs-on: ubuntu-latest | |
needs: buildCore | |
# Matrix of jobs to run | |
strategy: | |
fail-fast: false | |
matrix: | |
mod-loader: ['forge', 'fabric'] | |
mc-version: ['1.16.4'] | |
#exclude: | |
# - mod-loader: 'forge' | |
# mc-version: '1.17' | |
steps: | |
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it | |
- uses: actions/checkout@v4 | |
# Setup JDK | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: adopt | |
java-version: 8 | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v2 | |
# Download Core | |
- name: Download Core Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: maven | |
path: ~/.m2/repository | |
# Build Core | |
# - name: Build/Install Core | |
# working-directory: ./MinecraftMod/core | |
# run: './gradlew publishToMavenLocal' | |
# Build Minecraft Mod | |
- name: Build Mod | |
working-directory: ./MinecraftMod/${{ matrix.mod-loader }}/${{ matrix.mc-version }} | |
run: './gradlew build --no-daemon' | |
# Upload Artifact | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.mod-loader }} ${{ matrix.mc-version }} | |
path: ./MinecraftMod/${{ matrix.mod-loader }}/${{ matrix.mc-version }}/build/libs/*.jar | |
buildJava17: | |
name: Build ${{ matrix.mod-loader }} ${{ matrix.mc-version }} | |
runs-on: ubuntu-latest | |
needs: buildCore | |
# Matrix of jobs to run | |
strategy: | |
fail-fast: false | |
matrix: | |
mod-loader: ['fabric', 'forge'] | |
mc-version: ['1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', "1.20.2", "1.20.4"] | |
#exclude: | |
# - mod-loader: 'forge' | |
# mc-version: '1.17' | |
steps: | |
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it | |
- uses: actions/checkout@v4 | |
# # Setup JDK | |
# - name: Set up JDK 1.8 | |
# uses: actions/setup-java@v2 | |
# with: | |
# distribution: 'adopt' | |
# java-version: 8 | |
# # Build Core | |
# - name: Build/Install Core | |
# working-directory: ./MinecraftMod/core | |
# run: './gradlew publishToMavenLocal' | |
# Setup JDK | |
- name: Set up JDK 1.17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: 17 | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v2 | |
# Download Core | |
- name: Download Core Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: maven | |
path: ~/.m2/repository | |
# Build Minecraft Mod | |
- name: Build Mod | |
working-directory: ./MinecraftMod/${{ matrix.mod-loader }}/${{ matrix.mc-version }} | |
run: './gradlew build --no-daemon' | |
# Upload Artifact | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.mod-loader }} ${{ matrix.mc-version }} | |
path: ./MinecraftMod/${{ matrix.mod-loader }}/${{ matrix.mc-version }}/build/libs/*.jar | |
buildPlugin: | |
name: Build Stream Deck Plugin | |
runs-on: windows-latest | |
needs: buildCore | |
steps: | |
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it | |
- uses: actions/checkout@v4 | |
# # Setup JDK | |
# - name: Set up JDK 1.8 | |
# uses: actions/setup-java@v2 | |
# with: | |
# distribution: 'adopt' | |
# java-version: 8 | |
# # Build Core | |
# - name: Build/Install Core | |
# working-directory: ./MinecraftMod/core | |
# run: './gradlew.bat publishToMavenLocal' | |
# Setup JDK | |
- name: Set up JDK 16 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: microsoft | |
java-version: 16 | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v2 | |
# Download Core | |
- name: Download Core Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: maven | |
path: ~/.m2/repository | |
# Generate Stream Deck Plugin | |
- name: Generate Stream Deck Plugin | |
working-directory: ./StreamDeckPlugin | |
run: './gradlew.bat run --no-daemon' | |
# Run DistributionTool | |
- name: Run DistributionTool | |
uses: MoSadie/streamdeck-distribution-tool@22472fe2a1ae677822b11328d0df0f98dc7febab | |
with: | |
input: 'com.mosadie.effectmc.sdPlugin' | |
working-directory: 'StreamDeckPlugin' | |
# Upload Artifact | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Stream Deck Plugin | |
path: ./StreamDeckPlugin/*.streamDeckPlugin |