Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/tap-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: "https://github.com/civo/cli-go/releases/download/v$VERSION_NUMBER/civo_$VERSION_NUMBER_darwin_amd64.tar.gz
url: "https://github.com/civo/cli-go/releases/download/v$VERSION_NUMBER/civo_$VERSION_NUMBER_darwin_amd64.tar.gz"
tap: civo/homebrew-tools/formula/civo.rb
template: >
class Civo < Formula
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/goreleaser-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: GoReleaser Check

on:
push:
branches:
- master

permissions:
contents: read

jobs:
goreleaser-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ vars.GO_VERSION || '1.24.11' }}
cache: true

- name: Run GoReleaser Check
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: check

- name: Run GoReleaser Build (dry-run)
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: build --snapshot --clean
17 changes: 4 additions & 13 deletions .github/workflows/goreleaser.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,17 @@ jobs:
go-version: 1.24.x
cache-dependency-path: go.sum

# - name: Set up Snapcraft
# run: |
# sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# - name: Snapcraft Login
# env:
# SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
# run: |
# snapcraft login --with <(echo "$SNAPCRAFT_LOGIN")

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v1'
args: release --rm-dist
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
57 changes: 27 additions & 30 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
version: 2
project_name: civo
release:
github:
owner: civo
name: cli
draft: true
use_existing_draft: true
prerelease: auto
make_latest: false
mode: replace
changelog:
use: github-native
builds:
- env:
- CGO_ENABLED=0
Expand All @@ -7,15 +19,17 @@ builds:
- darwin
- windows
goarch:
- 386
- amd64
- arm
- arm64
- "386"
- "amd64"
- "arm"
- "arm64"
ignore:
- goos: darwin
goarch: 386
goarch: "386"
- goos: windows
goarch: "386"
- goos: windows
goarch: 386
goarch: "arm"
ldflags:
- -s -w -X github.com/civo/cli/common.VersionCli={{.Version}} -X github.com/civo/cli/common.CommitCli={{.Commit}} -X github.com/civo/cli/common.DateCli={{.Date}}
checksum:
Expand All @@ -32,16 +46,16 @@ archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
formats: [zip]
brews:
- name: civo
tap:
repository:
owner: civo
name: homebrew-tools
commit_author:
name: civobot
email: hello@civo.com
folder: Formula
directory: Formula
homepage: "https://github.com/civo/cli"
description: "CLI for managing Civo resources."
dockers:
Expand All @@ -54,29 +68,12 @@ dockers:
- "civo/cli:{{ .Tag }}"
dockerfile: docker/Dockerfile
nfpms:
- file_name_template: '{{ .ProjectName }}_{{ .Arch }}'
homepage: https://github.com/civo/cli
- file_name_template: "{{ .ProjectName }}_{{ .Arch }}"
homepage: https://github.com/civo/cli
description: Our Command Line Interface (CLI) for interacting with your Civo resources
maintainer: Alejandro J. Nuñez Madrazo <alejandro@civo.com>
license: MIT
vendor: Civo
formats:
- deb
- rpm
# snapcrafts:
# - name_template: "{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
# summary: Tool to handler all Civo cloud resource
# description: |
# Civo CLI is a tool to handler all resource inside the Civo cloud, from the console.
# grade: stable
# confinement: strict
# publish: true
# apps:
# civo:
# plugs: ["network", "network-bind", "home", "personal-files"]
# plugs:
# personal-files:
# read:
# - $HOME/.civo.json
# write:
# - $HOME/.civo.json
- deb
- rpm
Loading
Loading