Skip to content

Commit

Permalink
linux release
Browse files Browse the repository at this point in the history
release work

release work

release work

Release work

release work
  • Loading branch information
Wavesonics committed Apr 27, 2023
1 parent 1951088 commit 8286e2b
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,27 @@ jobs:
run: ./gradlew :desktop:packageReleaseMsi

- name: Rename Artifact
shell: cmd
run: |
setlocal EnableDelayedExpansion
setlocal enabledelayedexpansion
set "targetFile="
for %%f in (hammer-*.msi) do (
set "targetFile=%%f"
set "pattern=hammer-*.msi"
set "newName=hammer.msi"
set "foundFile="
for /r %%i in (%pattern%) do (
set "foundFile=%%i"
)
if not defined targetFile (
echo Could not find file matching pattern "hammer-*.msi"
exit /b 1
if defined foundFile (
echo Renaming !foundFile! to %newName%
ren "!foundFile!" "%newName%"
) else (
echo No file matching pattern found.
)
ren "!targetFile!" "hammer.msi"
endlocal
echo Successfully renamed file to "hammer.msi"
- name: Create Release
Expand Down Expand Up @@ -88,8 +95,9 @@ jobs:

- name: Rename Artifact
run: |
cd /home/runner/work/hammer-editor/hammer-editor/desktop/build/installers/main-release/deb/
# find the file matching the pattern and store its name in a variable
file=$(find . -type f -name 'hammer-*.deb' -print -quit)
file=$(find . -type f -name 'hammer_*.deb' -print -quit)
# if no file was found, exit with an error message
if [ -z "$file" ]; then
Expand Down

0 comments on commit 8286e2b

Please sign in to comment.