From 9daf5c139f9871fa771ae257abe8c7205a4d2691 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 5 Jan 2024 16:19:43 +0900 Subject: [PATCH] Use action when tag is pushed --- .forgejo/workflows/build-jar.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/build-jar.yaml b/.forgejo/workflows/build-jar.yaml index c75d36e..d2a9cdc 100644 --- a/.forgejo/workflows/build-jar.yaml +++ b/.forgejo/workflows/build-jar.yaml @@ -1,15 +1,15 @@ name: Build TurnBasedMC and store Artifact on: push: - branches: - - 'master' + tags: + - * jobs: build-and-store-artifact: runs-on: archLinux steps: - run: git clone --depth=1 --no-single-branch https://git.seodisparate.com/stephenseo/TurnBasedMinecraftMod.git TurnBasedMinecraftMod - - run: cd TurnBasedMinecraftMod && git checkout master + - run: cd TurnBasedMinecraftMod && git checkout ${GITHUB_REF_NAME} - run: cd TurnBasedMinecraftMod && sed -i '/org.gradle.jvmargs/s/Xmx[0-9]\+m/Xmx700m/' gradle.properties - run: cd TurnBasedMinecraftMod && ./gradlew --console=plain build - run: cd TurnBasedMinecraftMod/build/libs && find . -type f -exec sha256sum '{}' ';' -exec bash -c 'sha256sum {} >> sha256sums.txt' ';' && java --version >> javaVersion.txt && javac --version >> javaVersion.txt