File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Push Chocolatey Package
2+
3+ # This action will run when a PR that updates the Chocolatey package is merged to main
4+ # It can also be triggered manually
5+ on :
6+ push :
7+ branches :
8+ - main
9+ paths :
10+ - ' app/windows/chocolatey/headlamp.nuspec'
11+ - ' app/windows/chocolatey/tools/chocolateyinstall.ps1'
12+ workflow_dispatch :
13+
14+ permissions :
15+ contents : read
16+
17+ jobs :
18+ push-chocolatey :
19+ runs-on : windows-latest
20+ steps :
21+ - name : Checkout Headlamp
22+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
23+ with :
24+ ref : main
25+
26+ - name : Install Chocolatey
27+ run : |
28+ Set-ExecutionPolicy Bypass -Scope Process -Force
29+ [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
30+ iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
31+ shell : powershell
32+
33+ - name : Pack Chocolatey Package
34+ run : |
35+ cd app/windows/chocolatey
36+ choco pack
37+ shell : powershell
38+
39+ - name : Push to Chocolatey
40+ run : |
41+ cd app/windows/chocolatey
42+ $nupkg = Get-ChildItem -Filter *.nupkg | Select-Object -First 1
43+ if ($nupkg) {
44+ Write-Host "Pushing package: $($nupkg.Name)"
45+ choco push $nupkg.FullName --source https://push.chocolatey.org/ --key ${{ secrets.CHOCOLATEY_API_KEY }}
46+ } else {
47+ Write-Error "No .nupkg file found"
48+ exit 1
49+ }
50+ shell : powershell
You can’t perform that action at this time.
0 commit comments