Skip to content

Commit b40cfaf

Browse files
authored
ci: entrypoint for windows, build on windows machine
1 parent a08b49b commit b40cfaf

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
build-windows:
2020
name: Build Windows executable
21-
runs-on: ubuntu-latest
21+
runs-on: windows-latest
2222
steps:
2323
- name: Checkout repository
2424
uses: actions/checkout@v4
@@ -49,8 +49,15 @@ jobs:
4949
- name: Build Windows executable
5050
run: pp -o zap2xml.exe zap2xml.pl
5151

52-
- name: Cache once for testing
52+
- name: Copy entrypoint.bat
53+
run: |
54+
copy entrypoint.bat dist\entrypoint.bat
55+
copy zap2xml.exe dist\zap2xml.exe
56+
shell: cmd
57+
58+
- name: Upload Windows artifacts
5359
uses: actions/upload-artifact@v4
5460
with:
55-
path: zap2xml.exe
61+
name: zap2xml-windows
62+
path: dist/
5663
retention-days: 1

entrypoint.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
:loop
3+
set DATESTR=%DATE% %TIME%
4+
echo Running zap2xml.exe at %DATESTR%
5+
zap2xml.exe %OPT_ARGS%
6+
echo Last run time: %DATESTR%
7+
echo Will run again in %SLEEPTIME% seconds
8+
REM Default sleep time if not set
9+
if "%SLEEPTIME%"=="" set SLEEPTIME=43200
10+
powershell -Command "Start-Sleep -Seconds %SLEEPTIME%"
11+
goto loop

0 commit comments

Comments
 (0)