@@ -29,60 +29,19 @@ jobs:
2929 - name : Validate GoReleaser config
3030 uses : goreleaser/goreleaser-action@v6
3131 with :
32- version : latest
32+ version : ' ~> v2 '
3333 args : check
3434
3535 - name : Run GoReleaser
3636 uses : goreleaser/goreleaser-action@v6
3737 with :
38- version : latest
39- args : release --clean --skip=chocolatey
38+ distribution : goreleaser
39+ version : ' ~> v2'
40+ args : release --clean
4041 env :
4142 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4243 # Custom tokens for package manager repositories
4344 HOMEBREW_TAP_TOKEN : ${{ secrets.HOMEBREW_TAP_TOKEN }}
4445 SCOOP_BUCKET_TOKEN : ${{ secrets.SCOOP_BUCKET_TOKEN }}
45- WINGET_PR_TOKEN : ${{ secrets.WINGET_PR_TOKEN }}
46-
47- chocolatey :
48- name : Build Chocolatey Package
49- runs-on : windows-latest
50- needs : release
51- permissions :
52- contents : write
53-
54- steps :
55- - name : Checkout
56- uses : actions/checkout@v4
57- with :
58- fetch-depth : 0
59-
60- - name : Set up Go
61- uses : actions/setup-go@v5
62- with :
63- go-version : " 1.24.4"
64-
65- - name : Install Chocolatey
66- shell : pwsh
67- run : |
68- Set-ExecutionPolicy Bypass -Scope Process -Force
69- [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
70- iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
71-
72- - name : Verify Chocolatey installation
73- shell : pwsh
74- run : |
75- # Refresh environment to pick up Chocolatey PATH
76- $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
77- choco --version
78-
79- - name : Run GoReleaser (Chocolatey only)
80- uses : goreleaser/goreleaser-action@v6
81- with :
82- version : latest
83- args : release --clean --skip=homebrew,scoop,winget,nfpm
84- env :
85- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8646 CHOCOLATEY_API_KEY : ${{ secrets.CHOCOLATEY_API_KEY }}
87- # Ensure Chocolatey is in PATH for GoReleaser
88- Path : ${{ env.Path }};C:\ProgramData\chocolatey\bin
47+ WINGET_PR_TOKEN : ${{ secrets.WINGET_PR_TOKEN }}
0 commit comments