Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
45 changes: 45 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,48 @@ release:
prerelease: auto
draft: true
name_template: "{{ .Tag }}"

chocolateys:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned that choco is probably not installed:

GoReleaser will not install chocolatey/choco nor any of its dependencies for you.

This might be helpful https://github.com/algolia/cli/blob/main/.github/workflows/releases.yml

- 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
Loading