Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GTNewHorizons/StructureLib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.17
Choose a base ref
...
head repository: GTNewHorizons/StructureLib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jul 16, 2022

  1. Copy the full SHA
    e8f5cd6 View commit details

Commits on Aug 8, 2022

  1. Implement autoplace (#6)

    Glease authored Aug 8, 2022
    Copy the full SHA
    609e504 View commit details
  2. Update zh_CN.lang (#8)

    iouter authored Aug 8, 2022
    Copy the full SHA
    f65010a View commit details

Commits on Aug 9, 2022

  1. Copy the full SHA
    4a8c154 View commit details

Commits on Aug 11, 2022

  1. Copy the full SHA
    728f251 View commit details

Commits on Aug 12, 2022

  1. suppress even more logging

    Glease committed Aug 12, 2022
    Copy the full SHA
    15c3406 View commit details
  2. migrate iterate to iterateV2

    Glease committed Aug 12, 2022
    Copy the full SHA
    ed24f15 View commit details
  3. apply spotless

    Glease committed Aug 12, 2022
    Copy the full SHA
    d33cdd7 View commit details
  4. Copy the full SHA
    c19ac86 View commit details

Commits on Aug 13, 2022

  1. Copy the full SHA
    73f113e View commit details
  2. Merge pull request #9 from GTNewHorizons/gtnhlib

    Use ItemStackMap from GTNHLib
    boubou19 authored Aug 13, 2022
    Copy the full SHA
    a168702 View commit details

Commits on Aug 20, 2022

  1. this is nbt sensitive

    Glease committed Aug 20, 2022
    Copy the full SHA
    82622d1 View commit details
  2. fix incomplete creative build

    Glease committed Aug 20, 2022
    Copy the full SHA
    e155c69 View commit details

Commits on Aug 23, 2022

  1. channels

    Glease committed Aug 23, 2022
    Copy the full SHA
    b34e901 View commit details
  2. unconditionally mark unsatisfied hint as red

    I don't think anyone would turn this off...
    Glease committed Aug 23, 2022
    Copy the full SHA
    b2624a3 View commit details
  3. configurable autoplace

    Glease committed Aug 23, 2022
    Copy the full SHA
    a12722c View commit details
  4. Copy the full SHA
    91d4a80 View commit details
  5. Copy the full SHA
    cb82b73 View commit details
  6. Copy the full SHA
    fd38dfc View commit details
  7. spotless

    Glease committed Aug 23, 2022
    Copy the full SHA
    dc1b1fc View commit details

Commits on Aug 24, 2022

  1. fix color

    Glease committed Aug 24, 2022
    Copy the full SHA
    94055bb View commit details
  2. provide api to mark particle as error

    we will probably need to have this render through the walls, but that's a task for later
    Glease committed Aug 24, 2022
    Copy the full SHA
    d73d2bf View commit details
  3. Copy the full SHA
    74dde96 View commit details
  4. Copy the full SHA
    ebcf62f View commit details
  5. add some todo...

    Glease committed Aug 24, 2022
    Copy the full SHA
    7e7064e View commit details
  6. try to reduce sorting

    Glease committed Aug 24, 2022
    Copy the full SHA
    ebf2d6f View commit details

Commits on Aug 25, 2022

  1. use profiler

    Glease committed Aug 25, 2022
    Copy the full SHA
    1481b68 View commit details
  2. use correct brightness

    Glease committed Aug 25, 2022
    Copy the full SHA
    5b6b51f View commit details
  3. add compat to hodgepodge

    turns out we just cannot call render block here since our blocks are not 1x1x1 and I definitely don't want to do one draw call for every hint particle
    Glease committed Aug 25, 2022
    Copy the full SHA
    7389f34 View commit details

Commits on Aug 28, 2022

  1. ofBlocksTiered bug fix

    Glease committed Aug 28, 2022
    Copy the full SHA
    56a083c View commit details
  2. spotless

    Glease committed Aug 28, 2022
    Copy the full SHA
    e70ea76 View commit details

Commits on Aug 29, 2022

  1. Create pages.yml

    Glease authored Aug 29, 2022
    Copy the full SHA
    21198c4 View commit details

Commits on Aug 30, 2022

  1. Add javadoc for APIs (#10)

    Glease authored Aug 30, 2022
    Copy the full SHA
    adc91bb View commit details

Commits on Sep 2, 2022

  1. Copy the full SHA
    9b318f6 View commit details
  2. Copy the full SHA
    03f2c31 View commit details

Commits on Sep 3, 2022

  1. Update zh_CN.lang (#11)

    Co-authored-by: Glease <4586901+Glease@users.noreply.github.com>
    iouter and Glease authored Sep 3, 2022
    Copy the full SHA
    1b7cee7 View commit details

Commits on Sep 5, 2022

  1. Copy the full SHA
    e71edd5 View commit details

Commits on Sep 6, 2022

  1. address inspections

    Glease committed Sep 6, 2022
    Copy the full SHA
    df4c54e View commit details

Commits on Sep 9, 2022

  1. Copy the full SHA
    9bd19b9 View commit details
  2. Copy the full SHA
    8ee90a7 View commit details
  3. fix particles not sorted when rendering

    some experimental code left in during initial rework...
    Glease committed Sep 9, 2022
    Copy the full SHA
    23605fc View commit details

Commits on Sep 16, 2022

  1. Copy the full SHA
    c081427 View commit details
  2. Spotless apply for branch feature/survival-autoplace-argument-object …

    …for #13 (#14)
    
    Co-authored-by: Glease <4586901+Glease@users.noreply.github.com>
    Co-authored-by: GitHub GTNH Actions <>
    github-actions[bot] and Glease committed Sep 16, 2022
    Copy the full SHA
    4fe9eb6 View commit details
  3. fix tests

    Glease committed Sep 16, 2022
    Copy the full SHA
    f813104 View commit details
  4. Copy the full SHA
    2dd4349 View commit details
  5. Copy the full SHA
    0ac8908 View commit details
  6. Copy the full SHA
    7d74a65 View commit details
  7. Copy the full SHA
    72ff51d View commit details
  8. remove unused imports

    Glease committed Sep 16, 2022
    Copy the full SHA
    74aefd2 View commit details
  9. Add instrumenting API

    Glease committed Sep 16, 2022
    Copy the full SHA
    875bc19 View commit details
Showing with 10,643 additions and 2,327 deletions.
  1. +2 −0 .git-blame-ignore-revs
  2. +44 −22 .gitattributes
  3. +2 −34 .github/workflows/build-and-test.yml
  4. +97 −0 .github/workflows/publish-javadoc.yaml
  5. +7 −44 .github/workflows/release-tags.yml
  6. +165 −0 LICENSE.txt
  7. +8 −1 README.md
  8. +42 −0 addon.gradle
  9. +2 −743 build.gradle
  10. +4 −0 dependencies.gradle
  11. +170 −27 gradle.properties
  12. BIN gradle/wrapper/gradle-wrapper.jar
  13. +3 −1 gradle/wrapper/gradle-wrapper.properties
  14. +175 −111 gradlew
  15. +27 −33 gradlew.bat
  16. +0 −1 repositories.gradle
  17. +23 −0 settings.gradle
  18. +657 −0 src/main/java/com/gtnewhorizon/structurelib/ClientProxy.java
  19. +128 −0 src/main/java/com/gtnewhorizon/structurelib/CommonProxy.java
  20. +126 −7 src/main/java/com/gtnewhorizon/structurelib/ConfigurationHandler.java
  21. +9 −6 src/main/java/com/gtnewhorizon/structurelib/ConfigurationVersion.java
  22. +702 −0 src/main/java/com/gtnewhorizon/structurelib/GuiEditRegistryConfig.java
  23. +6 −5 src/main/java/com/gtnewhorizon/structurelib/GuiFactory.java
  24. +26 −0 src/main/java/com/gtnewhorizon/structurelib/GuiHandler.java
  25. +15 −9 src/main/java/com/gtnewhorizon/structurelib/GuiModConfig.java
  26. +8 −0 src/main/java/com/gtnewhorizon/structurelib/IStructureCompat.java
  27. +77 −0 src/main/java/com/gtnewhorizon/structurelib/RegistryOrderEntry.java
  28. +198 −0 src/main/java/com/gtnewhorizon/structurelib/SortedRegistry.java
  29. +160 −0 src/main/java/com/gtnewhorizon/structurelib/StructureEvent.java
  30. +100 −17 src/main/java/com/gtnewhorizon/structurelib/StructureLib.java
  31. +232 −15 src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java
  32. +2 −1 src/main/java/com/gtnewhorizon/structurelib/alignment/AlignmentLimits.java
  33. +2 −2 src/main/java/com/gtnewhorizon/structurelib/alignment/AlignmentUtility.java
  34. +40 −10 src/main/java/com/gtnewhorizon/structurelib/alignment/IAlignment.java
  35. +22 −18 src/main/java/com/gtnewhorizon/structurelib/alignment/IAlignmentLimits.java
  36. +2 −1 src/main/java/com/gtnewhorizon/structurelib/alignment/IAlignmentProvider.java
  37. +36 −26 src/main/java/com/gtnewhorizon/structurelib/alignment/IntegerAxisSwap.java
  38. +177 −0 src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/ChannelDataAccessor.java
  39. +86 −51 src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/ConstructableUtility.java
  40. +12 −2 src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/IConstructable.java
  41. +1 −0 src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/IConstructableProvider.java
  42. +53 −4 src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/IMultiblockInfoContainer.java
  43. +85 −0 src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/ISurvivalConstructable.java
  44. +4 −0 src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/package-info.java
  45. +15 −2 src/main/java/com/gtnewhorizon/structurelib/alignment/enumerable/Direction.java
  46. +76 −30 src/main/java/com/gtnewhorizon/structurelib/alignment/enumerable/ExtendedFacing.java
  47. +6 −4 src/main/java/com/gtnewhorizon/structurelib/alignment/enumerable/Flip.java
  48. +8 −5 src/main/java/com/gtnewhorizon/structurelib/alignment/enumerable/Rotation.java
  49. +5 −3 src/main/java/com/gtnewhorizon/structurelib/alignment/package-info.java
  50. +9 −6 src/main/java/com/gtnewhorizon/structurelib/block/BlockHint.java
  51. +121 −0 src/main/java/com/gtnewhorizon/structurelib/command/CommandConfigureChannels.java
  52. +52 −0 src/main/java/com/gtnewhorizon/structurelib/command/CommandRegistryDebug.java
  53. +53 −0 src/main/java/com/gtnewhorizon/structurelib/core/StructureLibCore.java
  54. +0 −139 src/main/java/com/gtnewhorizon/structurelib/entity/fx/EntityFXBlockHint.java
  55. +7 −4 src/main/java/com/gtnewhorizon/structurelib/entity/fx/WeightlessParticleFX.java
  56. +11 −0 src/main/java/com/gtnewhorizon/structurelib/event/BlockChangeListener.java
  57. +33 −0 src/main/java/com/gtnewhorizon/structurelib/event/BlockChangeNotifier.java
  58. +469 −0 src/main/java/com/gtnewhorizon/structurelib/gui/GuiScreenConfigureChannels.java
  59. +447 −0 src/main/java/com/gtnewhorizon/structurelib/gui/GuiScrollableList.java
  60. +25 −12 src/main/java/com/gtnewhorizon/structurelib/item/ItemBlockHint.java
  61. +49 −12 src/main/java/com/gtnewhorizon/structurelib/item/ItemConstructableTrigger.java
  62. +22 −12 src/main/java/com/gtnewhorizon/structurelib/item/ItemFrontRotationTool.java
  63. +188 −0 src/main/java/com/gtnewhorizon/structurelib/mixins/Mixins.java
  64. +30 −0 src/main/java/com/gtnewhorizon/structurelib/mixins/TargetedMod.java
  65. +44 −0 src/main/java/com/gtnewhorizon/structurelib/mixins/early/blockChangeNotifier/MixinForgeHooks.java
  66. +55 −0 src/main/java/com/gtnewhorizon/structurelib/mixins/early/blockChangeNotifier/MixinWorld.java
  67. +20 −18 src/main/java/com/gtnewhorizon/structurelib/net/AlignmentMessage.java
  68. +60 −0 src/main/java/com/gtnewhorizon/structurelib/net/ErrorHintParticleMessage.java
  69. +77 −0 src/main/java/com/gtnewhorizon/structurelib/net/RegistryOrderSyncMessage.java
  70. +73 −0 src/main/java/com/gtnewhorizon/structurelib/net/SetChannelDataMessage.java
  71. +77 −0 src/main/java/com/gtnewhorizon/structurelib/net/UpdateHintParticleMessage.java
  72. +0 −187 src/main/java/com/gtnewhorizon/structurelib/proxy/ClientProxy.java
  73. +0 −41 src/main/java/com/gtnewhorizon/structurelib/proxy/CommonProxy.java
  74. +231 −0 src/main/java/com/gtnewhorizon/structurelib/structure/AutoPlaceEnvironment.java
  75. +31 −0 src/main/java/com/gtnewhorizon/structurelib/structure/ChatThrottleKey.java
  76. +24 −0 src/main/java/com/gtnewhorizon/structurelib/structure/DefaultSurvivalBuildEnvironment.java
  77. +1 −0 src/main/java/com/gtnewhorizon/structurelib/structure/IBlockPosConsumer.java
  78. +3 −2 src/main/java/com/gtnewhorizon/structurelib/structure/ICustomBlockSetting.java
  79. +146 −0 src/main/java/com/gtnewhorizon/structurelib/structure/IItemSource.java
  80. +8 −0 src/main/java/com/gtnewhorizon/structurelib/structure/ISpecialItemBlock.java
  81. +386 −130 src/main/java/com/gtnewhorizon/structurelib/structure/IStructureDefinition.java
  82. +303 −1 src/main/java/com/gtnewhorizon/structurelib/structure/IStructureElement.java
  83. +87 −0 src/main/java/com/gtnewhorizon/structurelib/structure/IStructureElementChain.java
  84. +22 −0 src/main/java/com/gtnewhorizon/structurelib/structure/IStructureElementCheckOnly.java
  85. +22 −0 src/main/java/com/gtnewhorizon/structurelib/structure/IStructureElementNoPlacement.java
  86. +22 −0 src/main/java/com/gtnewhorizon/structurelib/structure/IStructureNavigate.java
  87. +45 −0 src/main/java/com/gtnewhorizon/structurelib/structure/IStructureWalker.java
  88. +41 −0 src/main/java/com/gtnewhorizon/structurelib/structure/ISurvivalBuildEnvironment.java
  89. +1 −0 src/main/java/com/gtnewhorizon/structurelib/structure/ITierConverter.java
  90. +2 −1 src/main/java/com/gtnewhorizon/structurelib/structure/IWithExtendedContext.java
  91. +32 −2 src/main/java/com/gtnewhorizon/structurelib/structure/LazyStructureElement.java
  92. +97 −49 src/main/java/com/gtnewhorizon/structurelib/structure/StructureDefinition.java
  93. +26 −0 src/main/java/com/gtnewhorizon/structurelib/structure/StructureElement_Bridge.java
  94. +2,085 −376 src/main/java/com/gtnewhorizon/structurelib/structure/StructureUtility.java
  95. +70 −0 src/main/java/com/gtnewhorizon/structurelib/structure/SurvivalBuildStructureWalker.java
  96. +1 −1 src/main/java/com/gtnewhorizon/structurelib/structure/adders/IBlockAdder.java
  97. +1 −0 src/main/java/com/gtnewhorizon/structurelib/structure/adders/ITileAdder.java
  98. +4 −0 src/main/java/com/gtnewhorizon/structurelib/structure/adders/package-info.java
  99. +5 −3 src/main/java/com/gtnewhorizon/structurelib/structure/package-info.java
  100. +50 −0 src/main/java/com/gtnewhorizon/structurelib/util/InventoryIterable.java
  101. +396 −0 src/main/java/com/gtnewhorizon/structurelib/util/InventoryUtility.java
  102. +41 −0 src/main/java/com/gtnewhorizon/structurelib/util/ItemStackArrayIterable.java
  103. +118 −0 src/main/java/com/gtnewhorizon/structurelib/util/ItemStackPredicate.java
  104. +18 −0 src/main/java/com/gtnewhorizon/structurelib/util/MiscUtils.java
  105. +64 −0 src/main/java/com/gtnewhorizon/structurelib/util/SortedRegistry.java
  106. +20 −3 src/main/java/com/gtnewhorizon/structurelib/util/Vec3Impl.java
  107. +57 −91 src/main/java/com/gtnewhorizon/structurelib/util/XSTR.java
  108. +292 −0 src/main/javadoc/overview.html
  109. +34 −1 src/main/resources/assets/structurelib/lang/en_US.lang
  110. +34 −1 src/main/resources/assets/structurelib/lang/zh_CN.lang
  111. BIN src/main/resources/assets/structurelib/textures/gui/channels.png
  112. BIN src/main/resources/assets/structurelib/textures/gui/fourwayarrow2.png
  113. +8 −0 src/main/resources/mixins.structurelib.early.json
  114. +8 −0 src/main/resources/mixins.structurelib.json
  115. +8 −0 src/main/resources/mixins.structurelib.late.json
  116. +1 −0 src/main/resources/structurelib_at.cfg
  117. +29 −0 src/test/java/com/gtnewhorizon/structurelib/alignment/enumerable/ExtendedFacingTest.java
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore spotlessApply reformat
464e44de8541a46833f50c3bd363d50e1677a685
66 changes: 44 additions & 22 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
* text eol=lf

*.[jJ][aA][rR] binary

*.[pP][nN][gG] binary
*.[jJ][pP][gG] binary
*.[jJ][pP][eE][gG] binary
*.[gG][iI][fF] binary
*.[tT][iI][fF] binary
*.[tT][iI][fF][fF] binary
*.[iI][cC][oO] binary
*.[sS][vV][gG] text
*.[eE][pP][sS] binary
*.[xX][cC][fF] binary

*.[kK][aA][rR] binary
*.[mM]4[aA] binary
*.[mM][iI][dD] binary
*.[mM][iI][dD][iI] binary
*.[mM][pP]3 binary
*.[oO][gG][gG] binary
*.[rR][aA] binary

*.7[zZ] binary
*.[gG][zZ] binary
*.[tT][aA][rR] binary
*.[tT][gG][zZ] binary
*.[zZ][iI][pP] binary

*.[tT][cC][nN] binary
*.[sS][oO] binary
*.[dD][lL][lL] binary
*.[dD][yY][lL][iI][bB] binary
*.[pP][sS][dD] binary
*.[tT][tT][fF] binary
*.[oO][tT][fF] binary

*.[pP][aA][tT][cC][hH] -text

*.[bB][aA][tT] text eol=crlf
*.[cC][mM][dD] text eol=crlf
*.[pP][sS]1 text eol=crlf

*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary
36 changes: 2 additions & 34 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build and test

@@ -11,35 +9,5 @@ on:

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup the workspace
run: ./gradlew setupCIWorkspace

- name: Build the mod
run: ./gradlew build

- name: Run server for 1.5 minutes
run: |
mkdir run
echo "eula=true" > run/eula.txt
timeout 90 ./gradlew runServer 2>&1 | tee -a server.log || true
- name: Test no errors reported during server run
run: |
chmod +x .github/scripts/test_no_error_reports
.github/scripts/test_no_error_reports
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
secrets: inherit
97 changes: 97 additions & 0 deletions .github/workflows/publish-javadoc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Deploy Javadoc

on:
push:
branches:
- master
- feature/doc
tags:
- '*'
delete:

permissions:
contents: write
pages: write
id-token: write

jobs:
prune:
if: github.event_name == 'delete'
concurrency: javadoc-publish
runs-on: ubuntu-latest
outputs:
result_hash: ${{ steps.deploy.outputs.hash }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: gh-pages

- name: Deploy 🚀
id: deploy
shell: bash
run: |
if git rm -r $TARGET_FOLDER ; then
echo Nothing to clean up
fi
find . -name javadoc -type d -print | sed 's#^\./\(.*\)/javadoc$#\1#' | sort --version-sort --reverse > index.txt
git add index.txt
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR_ID}-${GITHUB_ACTOR}@users.noreply.github.com"
git commit -m "Clean up javadoc after ref $TARGET_FOLDER is deleted"
git push
echo "hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
env:
TARGET_FOLDER: ${{ github.ref_name }}

javadoc:
if: github.event_name == 'push'
concurrency: javadoc-publish
runs-on: ubuntu-latest
outputs:
result_hash: ${{ steps.deploy.outputs.hash }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-java@v3
with:
java-version: |
8
11
17
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Generate Javadoc
run: ./gradlew --no-daemon spotlessCheck javadoc

- name: Deploy 🚀
id: deploy
shell: bash
run: |
mv build/docs $RUNNER_TEMP/docs_output
rm build -rf
git checkout gh-pages
mkdir -p $TARGET_FOLDER
rm -rf $TARGET_FOLDER
mv $RUNNER_TEMP/docs_output $TARGET_FOLDER -v
git add $TARGET_FOLDER
if git diff --cached --exit-code > /dev/null ; then
echo Nothing to deploy
exit 0
fi
find . -name javadoc -type d -print | sed 's#^\./\(.*\)/javadoc$#\1#' | sort --version-sort --reverse > index.txt
git add index.txt
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR_ID}-${GITHUB_ACTOR}@users.noreply.github.com"
git commit -m "Deploy javadoc from ref $TARGET_FOLDER"
git push
echo "hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
env:
TARGET_FOLDER: ${{ github.ref_name }}
51 changes: 7 additions & 44 deletions .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,14 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Release tagged build

on:
push:
tags:
- '*'
tags: [ '*' ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
permissions:
contents: write

- name: Setup the workspace
run: ./gradlew setupCIWorkspace

- name: Build the mod
run: ./gradlew build

- name: Release under current tag
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
prerelease: false
title: "${{ env.RELEASE_VERSION }}"
files: build/libs/*.jar

- name: Publish to Maven
run: ./gradlew publish
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
jobs:
release-tags:
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
secrets: inherit
Loading