Skip to content

Commit 5647e87

Browse files
authored
ci: drop chocolatey from ci (#11245)
1 parent 3071863 commit 5647e87

File tree

2 files changed

+0
-102
lines changed

2 files changed

+0
-102
lines changed

.github/workflows/release.yaml

-63
Original file line numberDiff line numberDiff line change
@@ -479,66 +479,3 @@ jobs:
479479
# For gh CLI. We need a real token since we're commenting on a PR in a
480480
# different repo.
481481
GH_TOKEN: ${{ secrets.CDRCI_GITHUB_TOKEN }}
482-
483-
publish-chocolatey:
484-
name: Publish to Chocolatey
485-
runs-on: windows-latest
486-
needs: release
487-
if: ${{ !inputs.dry_run }}
488-
489-
steps:
490-
- name: Checkout
491-
uses: actions/checkout@v4
492-
with:
493-
fetch-depth: 0
494-
495-
# Same reason as for release.
496-
- name: Fetch git tags
497-
run: git fetch --tags --force
498-
499-
# From https://chocolatey.org
500-
- name: Install Chocolatey
501-
run: |
502-
Set-ExecutionPolicy Bypass -Scope Process -Force
503-
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
504-
505-
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
506-
507-
- name: Build chocolatey package
508-
run: |
509-
cd scripts/chocolatey
510-
511-
# The package version is the same as the tag minus the leading "v".
512-
# The version in this output already has the leading "v" removed but
513-
# we do it again to be safe.
514-
$version = "${{ needs.release.outputs.version }}".Trim('v')
515-
516-
$release_assets = gh release view --repo coder/coder "v${version}" --json assets | `
517-
ConvertFrom-Json
518-
519-
# Get the URL for the Windows ZIP from the release assets.
520-
$zip_url = $release_assets.assets | `
521-
Where-Object name -Match ".*_windows_amd64.zip$" | `
522-
Select -ExpandProperty url
523-
524-
echo "ZIP URL: ${zip_url}"
525-
echo "Package version: ${version}"
526-
527-
echo "Downloading ZIP..."
528-
Invoke-WebRequest $zip_url -OutFile assets.zip
529-
530-
echo "Extracting ZIP..."
531-
Expand-Archive assets.zip -DestinationPath assets/
532-
533-
# No need to specify nuspec if there's only one in the directory.
534-
choco pack --version=$version binary_path=assets/coder.exe
535-
536-
choco apikey --api-key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
537-
538-
# No need to specify nupkg if there's only one in the directory.
539-
choco push --source https://push.chocolatey.org/
540-
541-
env:
542-
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
543-
# We need a GitHub token for the gh CLI to function under GitHub Actions
544-
GH_TOKEN: ${{ secrets.CDRCI_GITHUB_TOKEN }}

scripts/chocolatey/coder.nuspec

-39
This file was deleted.

0 commit comments

Comments
 (0)