Skip to content

Commit

Permalink
Split into separate repository.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Sep 12, 2024
1 parent c43f052 commit e0a8189
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/chocolatey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
chocolatey:
name: Deploy to chocolatey.org
runs-on: windows-latest
if: github.repository == 'openhv/openhv'
steps:
- name: Clone Repository
uses: actions/checkout@v4
Expand All @@ -27,30 +26,30 @@ jobs:
run: |
filename="OpenHV-${{ github.event.inputs.tag }}-x86.exe"
url="https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.tag }}/${filename}"
sed -i "s#{URL32}#${url}#g" "packaging/windows/chocolatey/tools/chocolateyinstall.ps1"
curl -sSL "${url}" -o "packaging/windows/${filename}"
md5=$(cat "packaging/windows/${filename}" | md5sum -)
sed -i "s/{MD5CHECKSUM32}/${md5:0:32}/g" "packaging/windows/chocolatey/tools/chocolateyinstall.ps1"
sed -i "s#{URL32}#${url}#g" "tools/chocolateyinstall.ps1"
curl -sSL "${url}" -o "${filename}"
md5=$(cat "${filename}" | md5sum -)
sed -i "s/{MD5CHECKSUM32}/${md5:0:32}/g" "tools/chocolateyinstall.ps1"
filename="OpenHV-${{ github.event.inputs.tag }}-x64.exe"
url="https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.tag }}/${filename}"
sed -i "s#{URL64}#${url}#g" "packaging/windows/chocolatey/tools/chocolateyinstall.ps1"
curl -sSL "${url}" -o "packaging/windows/${filename}"
md5=$(cat "packaging/windows/${filename}" | md5sum -)
sed -i "s/{MD5CHECKSUM64}/${md5:0:32}/g" "packaging/windows/chocolatey/tools/chocolateyinstall.ps1"
sed -i "s#{URL64}#${url}#g" "tools/chocolateyinstall.ps1"
curl -sSL "${url}" -o "${filename}"
md5=$(cat "${filename}" | md5sum -)
sed -i "s/{MD5CHECKSUM64}/${md5:0:32}/g" "tools/chocolateyinstall.ps1"
- name: Set Version
id: version
run: |
tag=${{ github.event.inputs.tag }}
version="${tag:0:4}.${tag:4:2}.${tag:6:2}"
echo "nuget=$version" >> $GITHUB_OUTPUT
sed -i "s/{VERSION}/${version}/g" "packaging/windows/chocolatey/openhv.nuspec"
sed -i "s/{VERSION}/${version}/g" "openhv.nuspec"
- name: Pack Release
run: |
choco pack packaging/windows/chocolatey/openhv.nuspec --outputdirectory packaging/windows/chocolatey
choco pack openhv.nuspec --outputdirectory chocolatey
- name: Upload Release
run: |
package=$(find packaging/windows/chocolatey/ -type f -name "*.nupkg")
package=$(find -type f -name "*.nupkg")
choco push $package -s https://push.chocolatey.org/ -k ${{ secrets.CHOCO_KEY }} --allow-unofficial
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# OpenHV Chocolatey Packages

Install and update using the [Chocolatey](https://github.com/chocolatey) package manager for Windows.

## Install

```powershell
choco install openhv
```

## Upgrade

```powershell
choco upgrade openhv
```

## Uninstall

```powershell
choco uninstall openhv
```
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e0a8189

Please sign in to comment.