Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj-hrivnak committed Oct 18, 2024
2 parents d759f89 + bbcbd4a commit 336ff42
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 79 deletions.
94 changes: 15 additions & 79 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ jobs:
name: jvm-jar
path: build/libs/*

release-github:
name: Release GitHub
release:
name: Release
runs-on: ubuntu-latest
needs: [changelog, build-jvm-jar]
permissions:
Expand All @@ -98,89 +98,25 @@ jobs:
uses: actions/download-artifact@v4
with:
name: changelog

- name: Download Artifact JVM Jar
uses: actions/download-artifact@v4
with:
name: jvm-jar
path: jar

- name: Create release
uses: softprops/action-gh-release@v1
path: build/libs/

- uses: Kir-Antipov/[email protected]
with:
body_path: ./NEW_CHANGELOG.md
prerelease: false
token: ${{ secrets.PUSH_ACCESS_TOKEN }}
files: |
jar/*
release-curseforge:
name: Release CurseForge
runs-on: ubuntu-latest
needs: [changelog, build-jvm-jar]
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Artifact Changelog
uses: actions/download-artifact@v4
with:
name: changelog
modrinth-id: EVaCo3rr
modrinth-token: ${{ secrets.MR_TOKEN }}

- name: Download Artifact JVM Jar
uses: actions/download-artifact@v4
with:
name: jvm-jar
path: jar
curseforge-id: 574029
curseforge-token: ${{ secrets.CF_TOKEN }}

- name: Create release
id: cf_release
uses: itsmeow/[email protected]
with:
token: ${{ secrets.CF_TOKEN }}
project_id: 574029
file_path: jar/Greenery-1.12.2-${{ needs.changelog.outputs.version }}.jar
display_name: Greenery-1.12.2-${{ needs.changelog.outputs.version }}
changelog: |
${{ needs.changelog.outputs.changelog_text }}
changelog_type: markdown
game_versions: "1.12.2,Forge"
game_endpoint: minecraft
relations: "fluidlogged-api:requiredDependency,forgelin-continuous:requiredDependency"
release_type: ${{ needs.changelog.outputs.rel_type }}

release-modrinth:
name: Release Modrinth
runs-on: ubuntu-latest
needs: [changelog, build-jvm-jar]
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Artifact Changelog
uses: actions/download-artifact@v4
with:
name: changelog
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Download Artifact JVM Jar
uses: actions/download-artifact@v4
with:
name: jvm-jar
path: jar
dependencies: |
fluidlogged-api
forgelin-continuous
- name: Upload to Modrinth
uses: dsx137/[email protected]
env:
MODRINTH_TOKEN: ${{ secrets.MR_TOKEN }}
with:
name: Greenery-1.12.2-${{ needs.changelog.outputs.version }}
project_id: EVaCo3rr
loaders: forge
game_versions: "1.12.2,1.12.1,1.12"
dependencies: "vVXPbodS:required,1mPcAmuy:required"
version_number: ${{ needs.changelog.outputs.version }}
changelog: |
${{ needs.changelog.outputs.changelog_text }}
version_type: ${{ needs.changelog.outputs.rel_type }}
files: |
jar/Greenery-1.12.2-${{ needs.changelog.outputs.version }}.jar
changelog-file: ./NEW_CHANGELOG.md
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Contributing to Greenery

When creating a new plant class, these things are important to know:

Handle blockstates only in following way:
```kt
private val topProperty: PropertyBool = PropertyBool.create("top")
override fun createPlantContainer() = plantContainer(ageProperty, topProperty,)

init
{
initBlockState()
defaultState = blockState.baseState
.withProperty(ageProperty, 0)
.withProperty(topProperty, true)
}
```

Sections of code in plant classes should be divided using these comments:

```
// -- BLOCK STATE --
(...block state code here)
// -- BLOCK --
(...block initialization & logic code here)
```

0 comments on commit 336ff42

Please sign in to comment.