Skip to content

Commit

Permalink
chocolatey: add package
Browse files Browse the repository at this point in the history
  • Loading branch information
Stunkymonkey committed Sep 16, 2024
1 parent b26534b commit b929c6d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ jobs:
run: |
./resources/scripts/package.ps1 -VersionNumber ${{ needs.next-version.outputs.new-release-version || '3.1.0' }}
- name: Package chocolatey
run: |
choco apikey --key $CHOCO_API_KEY --source https://push.chocolatey.org/
choco pack resources/chocolatey/glazewm.nuspec --version ${{ needs.next-version.outputs.new-release-version || '3.1.0' }} --outputdirectory out/
choco push out/glazewm.*.nupkg
- uses: actions/upload-artifact@v4
with:
name: installers
Expand Down
21 changes: 21 additions & 0 deletions resources/chocolatey/glazewm.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>glazewm</id>
<version>3.1.0</version>
<description>GlazeWM is a tiling window manager for Windows inspired by i3wm. </description>
<authors>glzr-io</authors>
<projectUrl>https://github.com/glzr-io/glazewm</projectUrl>
<license type="file">LICENSE.md</license>
<readme>README.md</readme>
<icon>icon.ico</icon>
<tags>glazewm window-manager</tags>
</metadata>
<files>
<file src="LICENSE.md" target="" />
<file src="README.md" target="" />
<file src="resources/assets/icon.ico" target="" />
<file src="tools\*" target="tools" />
<file src="out/installer-universal.exe" target="tools\installer-universal.exe" />
</files>
</package>
15 changes: 15 additions & 0 deletions resources/chocolatey/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$ErrorActionPreference = 'Stop'; # stop on all errors

$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installerLocation = Join-Path $toolsDir 'installer-universal.exe'

$packageArgs = @{
packageName = $packageName
fileType = 'exe'
file = $installerLocation
silentArgs = "/qn /norestart"
validExitCodes = @(0, 3010, 1641)
softwareName = 'GlazeWM'
}

Install-ChocolateyInstallPackage @packageArgs

0 comments on commit b929c6d

Please sign in to comment.