From caf2960b6b9adad43ac680dc0dbb8efe844eaf71 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:49:36 -0700 Subject: [PATCH] fix(actions): populate release tag --- .github/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 614c5fbd..66a04073 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,14 @@ jobs: run: ./installConcurrentUtil.sh - name: "execute gradle build" run: ./gradlew build - - name: Publish (Pre-)Release to Modrinth + - name: Determine Snapshot Status + run: | + if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then + echo "STATUS=snapshot" >> $GITHUB_ENV + else + echo "STATUS=release" >> $GITHUB_ENV + fi + - name: Publish (Pre-)Release to Modrinth & CurseForge if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}" run: ./gradlew :moonrise-fabric:publishMods :moonrise-neoforge:publishMods env: