From 69d59ced91c62f652e35c225c6c1c275d4b652b8 Mon Sep 17 00:00:00 2001 From: Gabber235 Date: Fri, 24 Nov 2023 17:17:28 +0100 Subject: [PATCH] Use short sha for version --- .../build-development-jars-and-publish.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-development-jars-and-publish.yml b/.github/workflows/build-development-jars-and-publish.yml index 3b29626493..941c18f3d6 100644 --- a/.github/workflows/build-development-jars-and-publish.yml +++ b/.github/workflows/build-development-jars-and-publish.yml @@ -55,9 +55,13 @@ jobs: adapter: WorldGuardAdapter - name: Get version id: vars - run: echo "version=$(cat version.txt)" >> $GITHUB_OUTPUT + run: | + version=$(cat version.txt) + short_sha=${GITHUB_SHA::7} + full_version="${version}-dev-${short_sha}" + echo "version=$full_version" >> $GITHUB_ENV - name: Debug full version - run: echo "${{ steps.vars.outputs.version }}-dev-${{ github.sha }}" + run: echo "${{ steps.vars.outputs.version }}" - name: Publish Development Jars uses: Kir-Antipov/mc-publish@v3.3 id: publish @@ -66,13 +70,13 @@ jobs: modrinth-token: ${{ secrets.MODRINTH_TOKEN }} modrinth-featured: false github-token: ${{ secrets.GITHUB_TOKEN }} - github-tag: "v${{ steps.vars.outputs.version }}-dev-${{ github.sha }}" + github-tag: "v${{ steps.vars.outputs.version }}" github-prerelease: true files: | plugin/build/libs/typewriter.jar adapters/**/build/libs/*.jar name: "Typewriter v${{ steps.vars.outputs.version }} Development Build" - version: "${{ steps.vars.outputs.version }}-dev-${{ github.sha }}" + version: "${{ steps.vars.outputs.version }}" version-type: "beta" loaders: | paper @@ -90,6 +94,6 @@ jobs: title: Published Development Build description: | I have published a development build of Typewriter. - Version: ${{ steps.vars.outputs.version }}-dev-${{ github.sha }} + Version: ${{ steps.vars.outputs.version }} [Download](${{ steps.publish.outputs.modrinth-url }})