diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 097f02e511..3506378daf 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -11,6 +11,11 @@ jobs: steps: - uses: actions/checkout@master + + - name: Embed version + run: | + echo -e "\ncachedversion = \"Canary ${GITHUB_SHA:0:7}\"" >> lua/wire/server/wirelib.lua + - uses: wiremod/gmod-upload@master with: id: 3066780663 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 266831e22a..3f683db030 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,10 +9,15 @@ jobs: steps: - uses: actions/checkout@master + + - name: Embed version + run: | + echo -e "\ncachedversion = \"Workshop ${GITHUB_SHA:0:7}\"" >> lua/wire/server/wirelib.lua + - uses: wiremod/gmod-upload@master with: id: 160250458 - changelog: "Deployment via Github to latest changes" + changelog: "Deployment via Github to commit ${GITHUB_SHA:0:7}" env: STEAM_USERNAME: ${{ secrets.WIRETEAM_WORKSHOP_USERNAME }} STEAM_PASSWORD: ${{ secrets.WIRETEAM_WORKSHOP_PASSWORD }} diff --git a/lua/wire/server/wirelib.lua b/lua/wire/server/wirelib.lua index 1a99b35322..0915542ddc 100644 --- a/lua/wire/server/wirelib.lua +++ b/lua/wire/server/wirelib.lua @@ -1223,14 +1223,6 @@ function WireLib.GetVersion() end end - -- Check if we're Workshop version first - for k, addon in pairs(engine.GetAddons()) do - if addon.wsid == "160250458" then - cachedversion = "Workshop" - return cachedversion - end - end - if not cachedversion then cachedversion = "Unknown" end return cachedversion