From 60a25563bfdbf62ef0feab8b14f7ca639fc656cf Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 24 Feb 2023 12:25:57 +0100 Subject: [PATCH] ci: embed the ref-name in the artifact names This takes a bit of extra care to strip away a leading v in the case of tags, which transforms tag-names like "v1.2.3-" to version numbers like "1.2.3". --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58535114..923a496e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,9 +55,11 @@ jobs: done; - name: Create DMG file run: hdiutil create -format UDZO -srcfolder editor/editor.app editor/editor.dmg + - name: Get the version + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV - uses: actions/upload-artifact@v3 with: - name: rocket-editor-macos + name: rocket-editor-${{ env.VERSION }}-macos path: editor/editor.dmg build-windows: name: Build (Windows) @@ -73,7 +75,9 @@ jobs: run: | qmake -tp vc editor/editor.pro msbuild editor.vcxproj /v:minimal /property:Configuration=Release /nologo + - name: Get the version + run: echo "version=$($env:GITHUB_REF_NAME.trimstart("v"))" >> $env:GITHUB_ENV - uses: actions/upload-artifact@v3 with: - name: rocket-editor-windows + name: rocket-editor-${{ env.VERSION }}-windows path: release/editor.exe