fix: Fixed agent ci install
This commit is contained in:
@@ -56,12 +56,8 @@ jobs:
|
||||
|
||||
msi:
|
||||
needs: build
|
||||
runs-on: ubuntu-docker
|
||||
container: mcr.microsoft.com/dotnet/sdk:9.0
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: Install Node (required by JS actions)
|
||||
run: apt-get update && apt-get install -y nodejs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -74,26 +70,30 @@ jobs:
|
||||
|
||||
- name: Build agent exe
|
||||
working-directory: agent
|
||||
shell: pwsh
|
||||
run: |
|
||||
GOOS=windows GOARCH=amd64 go build \
|
||||
-o ../installer/vantage-agent-windows-amd64.exe ./cmd
|
||||
$env:GOOS = "windows"; $env:GOARCH = "amd64"
|
||||
go build -o ../installer/vantage-agent-windows-amd64.exe ./cmd
|
||||
|
||||
- name: Fetch nssm
|
||||
working-directory: installer
|
||||
shell: pwsh
|
||||
run: |
|
||||
apt-get update && apt-get install -y unzip curl
|
||||
curl -fsSL -o nssm.zip https://nssm.cc/release/nssm-2.24.zip
|
||||
unzip -j nssm.zip 'nssm-2.24/win64/nssm.exe' -d .
|
||||
Invoke-WebRequest -Uri https://nssm.cc/release/nssm-2.24.zip -OutFile nssm.zip
|
||||
Expand-Archive -Path nssm.zip -DestinationPath nssm-extract -Force
|
||||
Copy-Item nssm-extract/nssm-2.24/win64/nssm.exe -Destination nssm.exe
|
||||
|
||||
- name: Install WiX
|
||||
shell: pwsh
|
||||
run: dotnet tool install --global wix --version 5.*
|
||||
|
||||
- name: Build MSI
|
||||
working-directory: installer
|
||||
shell: pwsh
|
||||
run: |
|
||||
export PATH="$PATH:/root/.dotnet/tools"
|
||||
$env:PATH = "$env:PATH;$env:USERPROFILE\.dotnet\tools"
|
||||
wix build vantage-agent.wxs -o vantage-agent.msi
|
||||
sha256sum vantage-agent.msi > checksums-msi.txt
|
||||
(Get-FileHash vantage-agent.msi -Algorithm SHA256).Hash.ToLower() + " vantage-agent.msi" | Out-File -Encoding ascii checksums-msi.txt
|
||||
|
||||
- name: Attach MSI to release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
|
||||
Reference in New Issue
Block a user