updates goreleaser

This commit is contained in:
Snider 2025-11-09 01:30:16 +00:00
parent bda2416816
commit 3ed1ccf08a
3 changed files with 15 additions and 5 deletions

View file

@ -21,7 +21,7 @@ jobs:
go-version: 1.22
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest

View file

@ -12,7 +12,7 @@ builds:
- id: mining-cli
main: ./cmd/mining
binary: miner-cli
output: "{{ .Arch }}/{{ .Os }}/{{ .Binary }}" # New output path within the archive
env:
- CGO_ENABLED=0
goos:
@ -33,8 +33,8 @@ builds:
archives:
- id: mining
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{ .Binary }}-{{ .Version }}-
{{- title .Os }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}

View file

@ -1,4 +1,4 @@
.PHONY: all build test clean install run demo help lint fmt vet docs install-swag dev
.PHONY: all build test clean install run demo help lint fmt vet docs install-swag dev package
# Variables
BINARY_NAME=miner-cli
@ -92,6 +92,15 @@ docs:
install-swag:
@echo "Installing swag CLI..."
go install github.com/swaggo/swag/cmd/swag@latest
# Install the swag CLI
install-goreleaser:
@echo "Installing go release..."
go install github.com/goreleaser/goreleaser/v2@latest
# Create local packages using goreleaser
package:
@echo "Creating local packages with GoReleaser..."
goreleaser release --snapshot --clean
# Development workflow
dev: tidy docs build
@ -117,5 +126,6 @@ help:
@echo " deps - Download dependencies"
@echo " docs - Generate Swagger documentation"
@echo " install-swag- Install the swag CLI"
@echo " package - Create local distribution packages using GoReleaser"
@echo " dev - Start the development server with docs and build"
@echo " help - Show this help message"