forked from Andrews54757/itemscroller-crafting-fix
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from wendavid552/fabric_1.19.x
Bump version.
- Loading branch information
Showing
13 changed files
with
349 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: step.build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
release: | ||
type: boolean | ||
required: false | ||
default: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: "temurin" | ||
java-version: 17 | ||
|
||
- name: Cache gradle files | ||
uses: actions/[email protected] | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
./.gradle/loom-cache | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '**/gradle.properties', '**/*.accesswidener') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Build with Gradle | ||
run: | | ||
chmod +x gradlew | ||
./gradlew classes --parallel | ||
./gradlew build | ||
env: | ||
BUILD_ID: ${{ github.run_number }} | ||
BUILD_RELEASE: ${{ inputs.release }} | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
name: build-artifacts | ||
path: build/libs/* |
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,16 @@ | ||
name: Dev Builds | ||
|
||
on: | ||
push: | ||
paths: | ||
- "*.gradle" | ||
- "gradle.properties" | ||
- "src/**" | ||
- "versions/**" | ||
- ".github/**" | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml |
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,104 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
workflow_dispatch: | ||
inputs: | ||
target_release_tag: | ||
description: The tag of the release you want to append the artifact to | ||
type: string | ||
required: true | ||
|
||
|
||
jobs: | ||
prepare: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.setmatrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Display context | ||
run: | | ||
echo ref_name = ${{ github.ref_name }} | ||
echo target_release_tag = ${{ github.event.inputs.target_release_tag }} | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
release: true | ||
|
||
release: | ||
needs: | ||
- build | ||
- prepare | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: build-artifacts | ||
|
||
- name: Get github release information | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
id: get_release | ||
uses: cardinalby/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
tag: ${{ github.event.inputs.target_release_tag }} | ||
|
||
- name: Generate publish related infomation | ||
id: release_info | ||
run: | | ||
if [ $GITHUB_EVENT_NAME == 'release' ] | ||
then | ||
echo "::set-output name=tag_name::" # leave an empty value here so softprops/action-gh-release will use the default value | ||
elif [ $GITHUB_EVENT_NAME == 'workflow_dispatch' ] | ||
then | ||
echo "::set-output name=tag_name::${{ github.event.inputs.target_release_tag }}" | ||
else | ||
echo Unknown github event name $GITHUB_EVENT_NAME | ||
exit 1 | ||
fi | ||
- name: Read Properties mod_version | ||
id: mod_version | ||
uses: christian-draeger/[email protected] | ||
with: | ||
path: gradle.properties | ||
property: mod_version | ||
|
||
- name: Read Properties minecraft_version | ||
id: minecraft_version | ||
uses: christian-draeger/[email protected] | ||
with: | ||
path: gradle.properties | ||
property: minecraft_version | ||
|
||
- name: Publish Minecraft Mods | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
github-tag: ${{ steps.release_info.outputs.tag_name }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
files-primary: ${{'build-artifacts/!(*-@(dev|sources)).jar'}} | ||
files-secondary: '' | ||
|
||
name: ${{ format('Itemscroller v {0} for mc{1}', steps.mod_version.outputs.value, steps.minecraft_version.outputs.value) }} | ||
version: ${{ format('mc{0}-v{1}', steps.minecraft_version.outputs.value, steps.mod_version.outputs.value) }} | ||
version-type: release | ||
changelog: ${{ format('{0}{1}', github.event.release.body, steps.get_release.outputs.body) }} # one of them should be an empty string (null) | ||
|
||
loaders: fabric | ||
game-versions: ${{ matrix.game_versions }} | ||
version-resolver: exact | ||
|
||
retry-attempts: 3 | ||
retry-delay: 10000 |
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 |
---|---|---|
|
@@ -5,8 +5,9 @@ build/ | |
eclipse/ | ||
.classpath | ||
.project | ||
.idea | ||
run/ | ||
.vscode | ||
build.number | ||
run/ | ||
.DS_Store | ||
launch.json | ||
launch.json |
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
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
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
18 changes: 18 additions & 0 deletions
18
src/main/java/fi/dy/masa/itemscroller/mixin/IMixinAnvilScreen.java
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,18 @@ | ||
package fi.dy.masa.itemscroller.mixin; | ||
|
||
import net.minecraft.client.gui.screen.ingame.AnvilScreen; | ||
import net.minecraft.client.gui.widget.TextFieldWidget; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
import java.awt.*; | ||
|
||
@Mixin(AnvilScreen.class) | ||
public interface IMixinAnvilScreen { | ||
@Invoker("onRenamed") | ||
void itemscroller_setItemName(String newName); | ||
|
||
@Accessor("nameField") | ||
TextFieldWidget itemscroller_getNameField(); | ||
} |
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
Oops, something went wrong.