Skip to content

Remove API classes; use core-api JAR #106

Remove API classes; use core-api JAR

Remove API classes; use core-api JAR #106

#name: Gradle Tests and Nightly (CI)
#
#env:
# GH_PKG_URL: "https://maven.pkg.github.com/${{ github.repository }}"
# CC_RELEASE: false
#
#on:
# workflow_dispatch:
# inputs:
# diagnostic_mode:
# description: Diagnostic Mode
# type: boolean
# default: false
# required: true
#
# push:
# branches:
# - '**'
# tags-ignore:
# - v*
# paths-ignore:
# - "README.md"
# - "LICENSE"
# - ".github/**/*"
#
#jobs:
# vars:
# name: Get Variables
# runs-on: ubuntu-22.04
# outputs:
# version: ${{steps.version.outputs.version}}
# mcVersion: ${{steps.gradle_props.outputs.minecraft_version}}
# forgeVersion: ${{steps.gradle_props.outputs.forge_version}}
#
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
#
# - name: Version
# id: version
# uses: paulhatch/semantic-version@v5.0.2
# with:
# change_path: "forge-api/ forge-main/"
# version_format: "${major}.${minor}.${patch}.${increment}-nightly"
# search_commit_body: true
# bump_each_commit: true
#
# - name: Read MC and Forge versions
# id: gradle_props
# uses: christian-draeger/read-properties@1.1.0
# with:
# path: "gradle.properties"
# properties: "minecraft_version forge_version"
#
# build-info:
# name: Build Info
# runs-on: ubuntu-22.04
# needs: [ vars ]
# steps:
# - name: Output
# run: |
# echo "Version: ${{ needs.vars.outputs.version }}"
# echo "Packages URL: ${{ env.GH_PKG_URL }}"
#
# tests:
# name: Gradle Tests
# runs-on: ubuntu-22.04
# needs: [ vars ]
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Set up JDK
# uses: actions/setup-java@v3
# with:
# distribution: temurin
# java-version: 17
#
# - name: Prepare Gradle
# uses: gradle/gradle-build-action@v2
#
# - name: Diagnostic Output
# if: inputs.diagnostic_mode
# run: |
# echo "Java Home: ${{env.JAVA_HOME}}"
# ./gradlew -q dependencies
#
# - name: Directory Structure Diagnostic
# if: inputs.diagnostic_mode
# run: tree > filetree.txt
#
# - name: Make Directories
# run: |
# mkdir run
# mkdir run/data
# mkdir run/test
# mkdir forge-main/src/generated
#
# - name: Generate Datagen Assets
# run: ./gradlew runData
# env:
# CC_VERSION: ${{ needs.vars.outputs.version }}
#
# - name: Store Built Assets
# if: success()
# uses: actions/upload-artifact@v3
# with:
# name: generated-data
# path: forge-main/src/generated/resources
#
# - name: Upload Failure
# if: failure()
# uses: actions/upload-artifact@v3
# with:
# name: generated-data-failure
# path: .
#
# - name: Test JAR with GameTest Server
# run: ./gradlew runGameTestServer
# env:
# CC_VERSION: ${{ needs.vars.outputs.version }}
#
# - name: Upload build failure
# if: failure()
# uses: actions/upload-artifact@v3
# with:
# name: test-data
# path: run/gametest
#
# publish-gh-package:
# name: Publish Github Package
# runs-on: ubuntu-22.04
# needs: [ vars, tests ]
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Unshallow and Get Tags
# run: git fetch --prune --unshallow --tags
#
# - name: Set up JDK
# uses: actions/setup-java@v3
# with:
# distribution: temurin
# java-version: 17
#
# - name: Setup Gradle
# uses: gradle/gradle-build-action@v2
#
# - name: Pull Built Data
# uses: actions/download-artifact@v3
# with:
# name: generated-data
# path: forge-main/src/generated/resources
#
# - name: Publish gradle nightly jar
# run: ./gradlew publishAllLibsPublicationToGitHubPackagesRepository
# env:
# CC_VERSION: ${{ needs.vars.outputs.version }}
# GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# get-package-info:
# name: Get Latest Package Info
# runs-on: ubuntu-22.04
# needs: [ publish-gh-package ]
# outputs:
# version: ${{ steps.download-info.outputs.version }}
# steps:
# - name: Download Package Info
# id: download-info
# uses: compactmods/dl-package-info@1.0.2
# env:
# GQL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# owner: compactmods
# repo: compactcrafting
# group: dev.compactmods.compactcrafting
# filter: "^compactcrafting-(?:[\\d\\.]+)-nightly.jar$"
# outputFile: compactcrafting-nightly.json
#
# - name: Debug output
# run: |
# echo "Version: ${{ steps.download-info.outputs.version }}"
# cat compactcrafting-nightly.json
#
# - name: Read info into variable [latest]
# id: info
# run: echo "latestJson=$(cat compactcrafting-nightly.json)" >> $GITHUB_OUTPUT
#
# - name: Download JAR and prepare artifacts
# run: |
# mkdir release
# curl -L "${{ fromJson(steps.info.outputs.latestJson)[0].url }}" -o "release/${{ fromJson(steps.info.outputs.latestJson)[0].name}}"
# mv compactcrafting-nightly.json release/compactcrafting-nightly.json
#
# - name: Add Artifact
# uses: actions/upload-artifact@v3
# with:
# name: release
# path: release
#
# announce:
# name: Discord Announcement
# needs: [ vars, get-package-info ]
# runs-on: ubuntu-22.04
# steps:
# - name: Grab JAR and Info
# uses: actions/download-artifact@v3
# with:
# name: release
# path: .
#
# - name: Read info into variable [latest]
# id: info
# run: echo "latestJson=$(cat compactcrafting-nightly.json)" >> $GITHUB_OUTPUT
#
# - name: Announce Release
# uses: compactmods/discord-releaser@0.1.5
# env:
# DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
# with:
# filename: ${{ fromJson(steps.info.outputs.latestJson)[0].name}}
# channel: ${{ secrets.NIGHTLY_CHANNEL_ID }}
# modName: Compact Crafting
# modVersion: ${{ needs.get-package-info.outputs.version }}
# thumbnail: https://media.forgecdn.net/avatars/thumbnails/324/502/64/64/637440523810696496.png
#
# forgeVersion: ${{ needs.vars.outputs.forgeVersion }}
# mcVersion: ${{ needs.vars.outputs.mcVersion }}