Skip to content

Commit

Permalink
make a file to store the game version
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Feb 24, 2024
1 parent 82c7982 commit a4fcf1e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/gradle-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
uses: metcalfc/changelog-generator@v4.3.0
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Read version
id: version
run: |
echo "::set-output name=version::$(cat version | head -n 1)"
- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -37,7 +41,7 @@ jobs:
files: build/libs/MoreFoWorld-*.jar
env:
DESCRIPTION: ${{ steps.changelog.outputs.changelog }}
GAME_VERSIONS: "1.20.4"
GAME_VERSIONS: ${{ steps.version.outputs.version }}

GITHUB_TOKEN: ${{ github.token }}

Expand Down
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ repositories {
}

dependencies {
paperweight.foliaDevBundle("1.20.4-R0.1-SNAPSHOT")
def versionFile = file("version")
if (!versionFile.exists()) {
throw new GradleException("version file not found")
}
def version = versionFile.text.trim()
paperweight.foliaDevBundle("$version-R0.1-SNAPSHOT")

def core = "4.3.21"
implementation "me.hsgamer:hscore-bukkit-baseplugin:$core"
Expand Down
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.20.4

0 comments on commit a4fcf1e

Please sign in to comment.