Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Bug
about: report bug/error
title: "[BUG]"
labels: bug
assignees: N-Joy-Shadow

---

**Describe the bug**

**To Reproduce**

**mod list / modpack **

**Screenshots**
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Feature request
about: Share your idea
title: "[Feature]"
labels: feature
assignees: N-Joy-Shadow

---

request more terminal?
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Related Issue
> If not present, skip it.


## PR summary


## ScreenShot (Optional)
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build mod

on:
push:
branches:
- '**'
pull_request:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest
outputs:
artifact_name: ${{ steps.vars.outputs.artifact_name }}
artifact_path: ${{ steps.vars.outputs.artifact_path }}
mc_version: ${{ steps.vars.outputs.mc_version }}
mod_version: ${{ steps.vars.outputs.mod_version }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Read Variables from gradle.properties
id: vars
run: |
java_version=$(grep '^java_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')
echo "java_version=$java_version" >> $GITHUB_OUTPUT
mc_version=$(grep '^minecraft_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')
echo "mc_version=$mc_version" >> $GITHUB_OUTPUT
mod_version=$(grep '^mod_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')
echo "mod_version=$mod_version" >> $GITHUB_OUTPUT
echo artifact_path=build/libs/ExtendedTerminal-$mc_version-$mod_version.jar >> $GITHUB_OUTPUT
echo artifact_name=ExtendedTerminal-$mc_version-$mod_version >> $GITHUB_OUTPUT
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: ${{ steps.vars.outputs.java_version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew build
106 changes: 106 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@

name: 'Publish to Modrinth & CurseForge'

on:
workflow_run:
workflows: ['build mod']
types: [completed]
branches: [ '1.20.1', ]

jobs:
build:
runs-on: ubuntu-latest
outputs:
artifact_name: ${{ steps.vars.outputs.artifact_name }}
artifact_path: ${{ steps.vars.outputs.artifact_path }}
mc_version: ${{ steps.vars.outputs.mc_version }}
mod_version: ${{ steps.vars.outputs.mod_version }}
mod_loader: ${{ steps.vars.outputs.mod_loader }}
version_type: ${{ steps.vars.outputs.version_type }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Read Variables from gradle.properties
id: vars
run: |
java_version=$(grep '^java_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')
echo "java_version=$java_version" >> $GITHUB_OUTPUT
mc_version=$(grep '^minecraft_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')
echo "mc_version=$mc_version" >> $GITHUB_OUTPUT
mod_version=$(grep '^mod_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')
echo "mod_version=$mod_version" >> $GITHUB_OUTPUT
mod_loader=$(grep '^mod_loader=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')
echo "mod_loader=$mod_loader" >> $GITHUB_OUTPUT
version_type=$(grep '^version_type=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')
echo "version_type=$version_type" >> $GITHUB_OUTPUT
echo artifact_path=build/libs/ExtendedTerminal-$mc_version-$mod_version.jar >> $GITHUB_OUTPUT
echo artifact_name=ExtendedTerminal-$mc_version-$mod_version >> $GITHUB_OUTPUT
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: ${{ steps.vars.outputs.java_version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.vars.outputs.artifact_name }}
path: |
${{ steps.vars.outputs.artifact_path }}
CHANGELOG.md
publish-to-curseforge:
if: github.event.workflow_run.event == 'push'
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build-artifact
uses: actions/download-artifact@6.0.0
with:
name: ${{ needs.build.outputs.artifact_name }}
- name: Publish to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: 1302078
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

changelog-file: 'CHANGELOG.md'
game-versions: ${{ needs.build.outputs.mc_version }}
loaders: ${{ needs.build.outputs.mc_loader }}
version-type: ${{ needs.build.outputs.version_type }}

files: '*.jar'
name: ${{ needs.build.outputs.artifact_name }}
version: ${{ needs.build.outputs.mc_version }}-${{ needs.build.outputs.mod_version }}
publish-to-modrinth:
if: github.event.workflow_run.event == 'push'
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build-artifact
uses: actions/download-arrtifact@6.0.0
with:
name: built-artifact
- name: Publish to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: extended-terminal
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

changelog-file: 'CHANGELOG.md'
game-versions: ${{ needs.build.outputs.mc_version }}
loaders: ${{ needs.build.outputs.mc_loader }}
version-type: ${{ needs.build.outputs.version_type }}

files: '*.jar'
name: ${{ needs.build.outputs.artifact_name }}
version: ${{ needs.build.outputs.mc_version }}-${{ needs.build.outputs.mod_version }}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ mapping_version=1.20.1
mod_id=extendedterminal
mod_name=Extended Terminal
mod_license=GNU LGPL 3.0
mod_version=0.1.1
mod_loader=forge
mod_version=0.1.2
mod_group_id=me.myogoo
java_version=17
mod_version_type=beta

mod_authors=NJoyShadow
mod_description=Add some terminal like extended crafting
Expand Down
Loading