Skip to content

Commit

Permalink
chore: update GitHub Actions workflow to simplify tag extraction and …
Browse files Browse the repository at this point in the history
…release creation

fix: correct AutoHotkey path references in build script
style: unify capitalization of folder names in build script paths
  • Loading branch information
rcmdnk committed Dec 10, 2024
1 parent 5e7c461 commit 32dfafc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,15 @@ jobs:
- name: build
shell: cmd
run: ./build.bat
- name: get tag
if: startsWith( github.ref, 'refs/tags/v' )
id: get_tag
shell: bash
run: echo ::set-output name=tag::${GITHUB_REF##*/}
- name: zip
if: startsWith( github.ref, 'refs/tags/v' )
shell: pwsh
run:
Compress-Archive -Path "vim_ahk" -DestinationPath vim_ahk-${{steps.get_tag.outputs.tag}}.zip
Compress-Archive -Path "vim_ahk" -DestinationPath vim_ahk-${{github.ref_name}}.zip
- name: Create Release
if: startsWith( github.ref, 'refs/tags/v' )
id: create_release
uses: softprops/action-gh-release@v2
with:
files: |
vim_ahk-${{steps.get_tag.outputs.tag}}.zip
vim_ahk-${{github.ref_name}}.zip
6 changes: 3 additions & 3 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@echo off
SET AHKPath=C:\Program Files\AutoHotkey\v2
SET AHKPath=C:\Program Files\AutoHotkey
REM Takes a simple optional command parameter, /t, which starts testing before build.
SET Param1=%1

if "%Param1%"=="/t" (
start /w "%AHKPath%\Autohotkey.exe" vim.ahk -quiet
start /w "%AHKPath%\v2\Autohotkey.exe" vim.ahk -quiet
)
REM Return code from above (0 if tests all pass) is stored in %errorlevel%
if errorlevel 1 (
Expand All @@ -20,5 +20,5 @@ if errorlevel 1 (
)
if exist vim_ahk rmdir /s /q vim_ahk
mkdir vim_ahk
"%AHKPath%\compiler\ahk2exe.exe" /in vim.ahk /out vim_ahk\vim_ahk.exe /compress 0 /base "%AHKPath%\v2\AutoHotkey.exe"
"%AHKPath%\Compiler\Ahk2Exe.exe" /in vim.ahk /out vim_ahk\vim_ahk.exe /compress 0 /base "%AHKPath%\v2\AutoHotkey.exe"
xcopy /i /y vim_ahk_icons vim_ahk\vim_ahk_icons

0 comments on commit 32dfafc

Please sign in to comment.