mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
feat: add Chocolatey package and Linux/macOS install script with automated publishing
This commit is contained in:
@@ -157,3 +157,22 @@ jobs:
|
||||
EchoHub-Client-linux-arm64.zip
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Publish Chocolatey package
|
||||
if: steps.changes.outputs.src_changed == 'true' && steps.check_release.outputs.exists == 'false'
|
||||
run: |
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
CHECKSUM=$(sha256sum EchoHub-Client-win-x64.zip | awk '{print $1}')
|
||||
|
||||
# Stamp version and checksum into package templates
|
||||
sed -i "s/__VERSION__/$VERSION/g" packaging/choco/echohub.nuspec
|
||||
sed -i "s/__VERSION__/$VERSION/g" packaging/choco/tools/chocolateyInstall.ps1
|
||||
sed -i "s/__CHECKSUM64__/$CHECKSUM/g" packaging/choco/tools/chocolateyInstall.ps1
|
||||
|
||||
# Build and push the package
|
||||
mkdir -p /tmp/choco-out
|
||||
cd packaging/choco
|
||||
choco pack echohub.nuspec --output-directory /tmp/choco-out
|
||||
choco push /tmp/choco-out/echohub.*.nupkg --source https://push.chocolatey.org/ --api-key "$CHOCO_API_KEY"
|
||||
env:
|
||||
CHOCO_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user