build(makefile): add release target using goreleaser and gh CLI token
- commit
- 5a80716973b09e53abb554b5169a43ffe8508012
- author
- brice · · 2026-02-28 03:59 UTC
- parent
- 1395b8e
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +9 -2
M Makefile +9 -2
| @@ -1,10 +1,11 @@ | |||
| 1 | - | .PHONY: check check-syntax check-shellcheck clean help build | |
| 1 | + | .PHONY: check check-syntax check-shellcheck clean help build release | |
| 2 | 2 | ||
| 3 | 3 | # Default target | |
| 4 | 4 | help: | |
| 5 | 5 | @echo "archup - Makefile targets:" | |
| 6 | 6 | @echo "" | |
| 7 | - | @echo " make build - Build archup binary" | |
| 7 | + | @echo " make build - Build archup binary | |
| 8 | + | make release - Release archup via goreleaser (uses gh CLI token)" | |
| 8 | 9 | @echo " make check - Run all checks (syntax + shellcheck)" | |
| 9 | 10 | @echo " make check-syntax - Check shell script syntax with bash -n" | |
| 10 | 11 | @echo " make check-shellcheck - Run shellcheck linting" | |
| @@ -17,6 +18,12 @@ build: | |||
| 17 | 18 | goreleaser build --snapshot --clean --single-target | |
| 18 | 19 | @echo "✓ Build complete: ./dist/archup_linux_amd64_v1/archup" | |
| 19 | 20 | ||
| 21 | + | # Release archup (requires GITHUB_TOKEN or gh CLI) | |
| 22 | + | release: | |
| 23 | + | @echo "Releasing archup..." | |
| 24 | + | GITHUB_TOKEN=$$(gh auth token) goreleaser release --clean | |
| 25 | + | @echo "✓ Release complete" | |
| 26 | + | ||
| 20 | 27 | # Run all checks | |
| 21 | 28 | check: check-syntax check-shellcheck | |
| 22 | 29 | @echo "" | |
| @@ -1,10 +1,11 @@ | |||||
| 1 | - | .PHONY: check check-syntax check-shellcheck clean help build | 1 | + | .PHONY: check check-syntax check-shellcheck clean help build release |
| 2 | 2 | ||||
| 3 | # Default target | 3 | # Default target | ||
| 4 | help: | 4 | help: | ||
| 5 | @echo "archup - Makefile targets:" | 5 | @echo "archup - Makefile targets:" | ||
| 6 | @echo "" | 6 | @echo "" | ||
| 7 | - | @echo " make build - Build archup binary" | 7 | + | @echo " make build - Build archup binary |
| 8 | + | make release - Release archup via goreleaser (uses gh CLI token)" | |||
| 8 | @echo " make check - Run all checks (syntax + shellcheck)" | 9 | @echo " make check - Run all checks (syntax + shellcheck)" | ||
| 9 | @echo " make check-syntax - Check shell script syntax with bash -n" | 10 | @echo " make check-syntax - Check shell script syntax with bash -n" | ||
| 10 | @echo " make check-shellcheck - Run shellcheck linting" | 11 | @echo " make check-shellcheck - Run shellcheck linting" | ||
| @@ -17,6 +18,12 @@ build: | |||||
| 17 | goreleaser build --snapshot --clean --single-target | 18 | goreleaser build --snapshot --clean --single-target | ||
| 18 | @echo "✓ Build complete: ./dist/archup_linux_amd64_v1/archup" | 19 | @echo "✓ Build complete: ./dist/archup_linux_amd64_v1/archup" | ||
| 19 | 20 | ||||
| 21 | + | # Release archup (requires GITHUB_TOKEN or gh CLI) | |||
| 22 | + | release: | |||
| 23 | + | @echo "Releasing archup..." | |||
| 24 | + | GITHUB_TOKEN=$$(gh auth token) goreleaser release --clean | |||
| 25 | + | @echo "✓ Release complete" | |||
| 26 | + | ||||
| 20 | # Run all checks | 27 | # Run all checks | ||
| 21 | check: check-syntax check-shellcheck | 28 | check: check-syntax check-shellcheck | ||
| 22 | @echo "" | 29 | @echo "" | ||