Skip to content

Commit

Permalink
ci: embed the ref-name in the artifact names
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
kusma committed Feb 24, 2023
1 parent 279c969 commit 60a2556
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

0 comments on commit 60a2556

Please sign in to comment.