From 8cb19380f76701086b249e9b68bb2c51d043a5f6 Mon Sep 17 00:00:00 2001 From: bd_ Date: Sun, 1 May 2022 19:21:09 -0700 Subject: [PATCH] Improve release workflow --- .github/workflows/build-release.yml | 12 +++++++----- Assets/bd_/AttachToMe/Scripts/AttachableVersion.cs | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 8bf3b6f..1faa3d7 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -17,6 +17,13 @@ jobs: cp LICENSE.txt Assets/bd_/AttachToMe/LICENSE.txt mkdir output cp LICENSE.txt output + - name: Set version based on tag + id: version + if: startsWith(github.event.ref, 'refs/tags/') + run: | + VERSION=${GITHUB_REF/refs\/tags\//} + echo ::set-output name=version::$VERSION + sed -i -e "s/SNAPSHOT/$VERSION/" Assets/bd_/AttachToMe/Scripts/AttachableVersion.cs - name: Build unitypackage uses: pCYSl5EDgo/create-unitypackage@2f4ac82dabd3a1029f7a6771f30dc796e4217551 with: @@ -27,11 +34,6 @@ jobs: with: path: output name: AttachToMe-dev - - name: Set version based on tag - id: version - if: startsWith(github.event.ref, 'refs/tags/') - run: | - echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} - name: Rename and zip artifacts if: startsWith(github.event.ref, 'refs/tags/') run: | diff --git a/Assets/bd_/AttachToMe/Scripts/AttachableVersion.cs b/Assets/bd_/AttachToMe/Scripts/AttachableVersion.cs index 255ac86..be82a83 100644 --- a/Assets/bd_/AttachToMe/Scripts/AttachableVersion.cs +++ b/Assets/bd_/AttachToMe/Scripts/AttachableVersion.cs @@ -22,7 +22,7 @@ namespace net.fushizen.attachable public class AttachableVersion : UdonSharpBehaviour { - readonly string VERSION = "AttachToMe v1.1.2"; + readonly string VERSION = "AttachToMe vSNAPSHOT"; #if !COMPILER_UDONSHARP && UNITY_EDITOR public static readonly bool IS_USHARP_10;