Skip to content

Commit

Permalink
ci: add windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Devigne committed Jun 2, 2024
1 parent c0d4b7e commit 9892583
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@ permissions:
contents: read

jobs:
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- run: go build -o ipingtray.exe

- name: Set up NSIS
run: choco install nsis

- name: Create installer
run: |
cp build/windows/installer.nsi .
& "C:\Program Files (x86)\NSIS\makensis.exe" "installer.nsi"
- name: Upload installer
uses: actions/upload-artifact@v2
with:
name: iPingTray-setup.exe
path: iPingTray-setup.exe

macos-build:
runs-on: macos-13
steps:
Expand Down Expand Up @@ -47,6 +70,7 @@ jobs:
pull-requests: write
needs:
- macos-build
- windows-build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
23 changes: 23 additions & 0 deletions build/windows/installer.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Outfile "iPingTray-setup.exe"

InstallDir "$PROGRAMFILES\iPingTray"

RequestExecutionLevel admin

Page directory
Page instfiles

Section "Install"
SetOutPath $INSTDIR

File /r "ipingtray.exe"

CreateShortCut "$SMSTARTUP\iPingTray.lnk" "$INSTDIR\ipingtray.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd

Section "Uninstall"
Delete "$INSTDIR\ipingtray.exe"
Delete "$SMSTARTUP\iPingTray.lnk"
RMDir /r "$INSTDIR"
SectionEnd

0 comments on commit 9892583

Please sign in to comment.