From b152a2dae749e6251e11f752cd13eee3100cffc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=C3=AFla=20Marabese?= Date: Fri, 10 Apr 2026 15:50:47 +0200 Subject: [PATCH 1/2] chore: add support for chocolatey in goreleaser --- .goreleaser.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 5d5f2dd437..d265df1edf 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -79,3 +79,48 @@ release: prerelease: auto draft: true name_template: "{{ .Tag }}" + +chocolateys: + - name: scaleway-cli + + # IDs of the archives to use. + # Empty means all IDs. + # Attention: archives must not be in the 'binary' format. + ids: + - binaries + + package_source_url: https://scaleway.com/cli + owners: Scaleway + authors: DevTools Team + + # Your app's project url. + # It is a required field. + project_url: https://github.com/scaleway/scaleway-cli + + icon_url: "https://github.com/scaleway/scaleway-cli/blob/main/docs/static_files/cli-artwork.png" + copyright: 2019 Scaleway + license_url: https://github.com/scaleway/scaleway-cli/blob/main/LICENSE + require_license_acceptance: false + + project_source_url: https://github.com/scaleway/scaleway-cli + docs_url: https://cli.scaleway.com + bug_tracker_url: https://github.com/scaleway/scaleway-cli/issues + + tags: "scaleway-cli scaleway scw" + summary: Scaleway CLI is a tool to help you pilot your Scaleway infrastructure directly from your terminal. + description: | + The Scaleway CLI allows you to interact with Scaleway APIs using a command line interface. + You can create, update, delete, list or get information about all types of resources. + + release_notes: "https://github.com/scaleway/scaleway-cli/releases/tag/v{{ .Version }}" + + # The API key that should be used to push to the Chocolatey repository. + api_key: "{{ .Env.CHOCOLATEY_API_KEY }}" + + # The source repository that will push the package to. + source_repo: "https://push.chocolatey.org/" + + # Setting this will prevent GoReleaser to actually try to push the package + # to Chocolatey repository, leaving the responsibility of publishing it to + # the user. + skip_publish: true From 3e574540ebbb5c1f3bc08409d171a09236f8bf14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=C3=AFla=20Marabese?= Date: Tue, 14 Apr 2026 11:26:42 +0200 Subject: [PATCH 2/2] commit for act (wip) --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0377900076..e25a57d0db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,7 @@ jobs: fetch-depth: 0 - name: Login to DockerHub Registry + if: ${{ ! env.ACT }} run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - name: Set up Docker Buildx @@ -32,6 +33,29 @@ jobs: go mod tidy git diff --exit-code + - name: Install mono (chocolatey requirement) + run: | + sudo apt-get update + sudo apt-get install -y mono-complete + + - name: Install chocolatey + run: | + # Create directories owned by your user + sudo mkdir -p /opt/chocolatey/config + sudo mkdir -p /opt/chocolatey/logs + sudo mkdir -p /opt/chocolatey/lib + + # Give ownership to your user (more secure than 777) + sudo chown -R $USER:$USER /opt/chocolatey/config + sudo chown -R $USER:$USER /opt/chocolatey/logs + + wget -q -O - "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar -xz -C "/opt/chocolatey" + echo '#!/bin/bash' >> /usr/local/bin/choco + echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco + chmod +x /usr/local/bin/choco + env: + CHOCOLATEY_VERSION: 2.7.1 + - name: Run GoReleaser uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0 with: