-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions Refactorization (#24)
* Update 20241230 - Actions Update Attempt to update GitHub CI. [CHANGELOG] 🟢 Added Fabric CI action under fabric.yml. 🟡 Updated the editor configuration file. 🟡 Updated the Build Check action for readability and to update the "capture build artifacts" step. 🟡 Updated README. 🔴 Removed Gradle Error Checker action by removing the error_action.yml file. * Update fabric.yml * Update README.md * Update README.md * Update README.md * Update fabric.yml * Update 20241230 - Actions Rework Reworked the actions after the last fabric action used was outdated by 4 years. * Update fabric.yml * Update 20241230 - Actions Rework * Update 20241230 - Actions Rework * Update 20241230 - Actions Rework * Update 20241230 - Actions Rework * Update prep.yml * Update 20241230 - Actions Rework * Refactor 20241230 - Composite Refactor Refactored the composite action for the workflow. * Update action.yml * Update action.yml * Update action.yml * Hotfix 20241230 - Quick Action Hotfix * Update fabric.yml * Update fabric.yml * Update fabric.yml * Update fabric.yml * Update fabric.yml * Fix Attempt 20241230 - Action Fix Attempt * Update action.yml * Fix Attempt 20241230 - Action Fix Attempt (1) * Fix Attempt 20241230 - Action Fix Attempt (2) * Fix Attempt 20241230 - Action Fix Attempt (3) * Fix Attempt 20241230 - Action Fix Attempt (4) * Fix Attempt 20241230 - Action Fix Attempt (5) * Fix Attempt 20241230 - Action Fix Attempt (6) * Fix Attempt 20241230 - Action Fix Attempt (7) * Fix Attempt 20241230 - Action Fix Attempt (8) * Potential Fix 20241230 - Potential FIx to GHA Potential fix for the perpetual failing GitHub Actions implementation since yesterday. PS: HALP! 助けて! Tulong! 帮助! Pomoc! 俺は losing my utak! * Potential Fix 20241230 - Potential FIx to GHA (2) * Hotfix 20241230 - Typo Fix * Potential Fix 20241230 - Potential Fix to GHA (3) * Potential Fix 20241230 - Potential Fix to GHA (4) * Potential Fix 20241230 - Potential Fix to GHA (5) * Potential Fix 20241230 - Potential Fix to GHA (6)
- Loading branch information
Showing
10 changed files
with
231 additions
and
42 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "Download Dependencies" | ||
description: "Downloads the dependencies for the mod" | ||
|
||
inputs: | ||
minecraft_version: | ||
type: string | ||
description: 'Minecraft version to use for testing. Defaults to "1.21.3".' | ||
default: "1.21.3" | ||
|
||
loader: | ||
type: string | ||
description: 'Mod loader to use for testing. Defaults to "fabric".' | ||
default: "fabric" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "[Geckolib 3] (${{ runner.os }}) Fetch Version" | ||
uses: ./.github/actions/set_to_env | ||
with: | ||
value: $( ./gradlew -q :getGeckolib3Version ) | ||
env_var: GECKOLIB3_VERSION | ||
|
||
- name: "[Geckolib 3] Downloading..." | ||
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 | ||
with: | ||
url: "https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/software/bernie/geckolib/geckolib-${{ inputs.loader }}-${{ inputs.minecraft_version }}/${{ env.GECKOLIB3_VERSION }}/geckolib-${{ inputs.loader }}-${{ inputs.minecraft_version }}-${{ env.GECKOLIB3_VERSION }}.jar" | ||
target: "run/mods" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Pre Testing" | ||
description: "Prepare the environment for testing" | ||
|
||
inputs: | ||
java: | ||
type: number | ||
description: 'Java version to use for testing. Defaults to 22.' | ||
default: 22 | ||
|
||
java_dist: | ||
type: string | ||
description: 'Java distribution to use for testing. Defaults to "adopt".' | ||
default: 'adopt' | ||
|
||
os: | ||
type: string | ||
description: 'Operating system to use for testing. Defaults to "ubuntu-latest".' | ||
default: 'ubuntu-latest' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "[Pre Testing] Debug Info" | ||
shell: bash | ||
run: | | ||
echo "Java Version: ${{ inputs.java }}" | ||
echo "Java Distribution: ${{ inputs.java_dist }}" | ||
echo "Operating System: ${{ inputs.os }}" | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup JDK ${{ inputs.java }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: ${{ inputs.java }} | ||
|
||
- name: Make Gradle Wrapper Executable | ||
if: ${{ inputs.os != 'Windows' }} | ||
shell: bash | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build Mod with Gradle | ||
shell: bash | ||
run: ./gradlew build --stacktrace |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: "Set Variable to Environment" | ||
description: "Sets a value to an environment variable with respect to the operating system" | ||
|
||
inputs: | ||
value: | ||
type: string | ||
description: 'Value to set to the environment variable.' | ||
required: true | ||
|
||
env_var: | ||
type: string | ||
description: 'Name of the environment variable to set.' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- if: runner.os != 'Windows' | ||
shell: bash | ||
run: echo "${{ inputs.env_var }}=${{ inputs.value }}" >> $GITHUB_ENV | ||
|
||
- if: runner.os == 'Windows' | ||
shell: powershell | ||
run: echo "${{ inputs.env_var }}=${{ inputs.value }}" | Out-File -FilePath $env:GITHUB_ENV -Append |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Fabric Testing | ||
on: [pull_request, push] | ||
|
||
jobs: | ||
run: | ||
strategy: | ||
matrix: | ||
version: | ||
- {minecraft_version: "1.21.3", java: 22, loader: fabric, api: "0.110.0"} | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare Testing | ||
uses: ./.github/actions/prep | ||
with: | ||
java: ${{ matrix.version.java }} | ||
java_dist: temurin | ||
os: ubuntu-latest | ||
|
||
- name: Get jar name | ||
uses: ./.github/actions/set_to_env | ||
with: | ||
value: $( ./gradlew -q :getJarName ) | ||
env_var: JAR_NAME | ||
|
||
- name: Stage mod for test client | ||
run: | | ||
mkdir -p run/mods | ||
cp build/libs/${{ env.JAR_NAME }}.jar run/mods | ||
- name: Download dependencies | ||
uses: ./.github/actions/download_dependencies | ||
with: | ||
minecraft_version: ${{ matrix.version.minecraft_version }} | ||
loader: ${{ matrix.version.loader }} | ||
|
||
|
||
- name: "[Fabric Testing] Debug Info" | ||
run: | | ||
echo "Minecraft Version: ${{ matrix.version.minecraft_version }}" | ||
echo "Mod Loader: ${{ matrix.version.loader }}" | ||
echo "Regex: .*${{ matrix.version.loader }}.*" | ||
echo "Java Version: ${{ matrix.version.java }}" | ||
echo "Runtime Test Version: ${{ matrix.version.loader }}" | ||
echo "Fabric API Version: ${{ matrix.version.api }}" | ||
- name: Run MC test client | ||
uses: headlesshq/[email protected] | ||
with: | ||
mc: ${{ matrix.version.minecraft_version }} | ||
modloader: ${{ matrix.version.loader }} | ||
regex: .*${{ matrix.version.loader }}.* | ||
java: ${{ matrix.version.java }} | ||
mc-runtime-test: ${{ matrix.version.loader }} | ||
xvfb: false | ||
fabric-api: ${{ matrix.version.api }} | ||
headlessmc-command: -lwjgl --jvm -Djava.awt.headless=true | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,34 @@ | ||
![](https://github.com/Virus5600/Defensive-Measures-Mod/blob/main/Defensive%20Measures%20Add-On%20Banner.png) | ||
<div align="center" style="text-align: center"> | ||
<img src="https://img.shields.io/github/actions/workflow/status/Virus5600/Defensive-Measures-Mod/build.yml?logo=gradle&label=Build%20Check" alt="GitHub Actions Workflow Status"> | ||
<img src="https://img.shields.io/github/actions/workflow/status/Virus5600/Defensive-Measures-Mod/fabric.yml?logo=gradle&label=Fabric%20Test%20Runner" alt="GitHub Actions Workflow Status"> | ||
</div> | ||
<br> | ||
|
||
<div align="center" style="text-align: center"> | ||
<img src="https://img.shields.io/modrinth/v/defensive-measures?logo=modrinth&label=Latest%20Modrinth%20Release" alt="Modrinth Version"> | ||
<img src="https://img.shields.io/curseforge/v/700629?logo=curseforge&label=Latest%20CurseForge%20Release" alt="CurseForge Version"> | ||
<img src="https://img.shields.io/github/v/tag/Virus5600/Defensive-Measures-Mod?include_prereleases&sort=semver&logo=github&label=Latest%20GitHub%20Tag" alt="GitHub Tag"> | ||
<img src="https://img.shields.io/github/v/release/Virus5600/Defensive-Measures-Mod?logo=semanticrelease&label=Latest%20Release" alt="GitHub release (latest by date)"> | ||
</div> | ||
<br> | ||
|
||
<div align="center" style="text-align: center"> | ||
<img src="https://img.shields.io/modrinth/dt/defensive-measures?logo=modrinth&label=Modrinth%20Downloads" alt="Modrinth Downloads"> | ||
<img src="https://img.shields.io/curseforge/dt/700629?logo=curseforge&label=CureForge%20Downloads" alt="CurseForge Downloads"> | ||
<img src="https://img.shields.io/github/downloads/Virus5600/Defensive-Measures-Mod/total?logo=github&label=GitHub%20Downloads" alt="GitHub Downloads (all assets, all releases)"> | ||
</div> | ||
<br> | ||
|
||
<div align="center" style="text-align: center"> | ||
<img src="https://raw.githubusercontent.com/Virus5600/Defensive-Measures-Mod/refs/heads/main/Defensive%20Measures%20Add-On%20Banner.png" alt="Defensive Measures Banner" width="100%"> | ||
</div> | ||
|
||
|
||
# Defensive-Measures | ||
|
||
Defensive Add-on is an add-on that allows players to place defensive turrets and traps to protect themselves, their creations, positions, and so on. The add-on adds <b><i>Towers</i></b>, <b><i>Traps</i></b>, <b><i>Entities</i></b>, <b><i>Structures</i></b>, <b><i>Villager Variants</i></b>, and <b><i>Items</i></b> to the game, which opens a lot of new capabilities, ideas, and creative imaginations for the players to explore. | ||
|
||
# SOCIAL LINKS | ||
# SUPPORT ME | ||
|
||
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D6BFRR3)<br> | ||
<a href="https://www.paypal.com/donate/?hosted_button_id=T5LTYWVFU29R8"><img src="https://github.com/Virus5600/Defensive-Measures-Add-on-Guide/blob/main/public/images/UI/paypal_donate.png" height="30px"></a> | ||
<a href="https://www.paypal.com/donate/?hosted_button_id=T5LTYWVFU29R8"><img src="https://raw.githubusercontent.com/Virus5600/Defensive-Measures-Add-on-Guide/refs/heads/main/public/images/UI/paypal_donate.png" height="30px"></a> |
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
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