diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5d9d91..6532de4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,21 +31,12 @@ jobs: - name: Build binary run: make release-${{ matrix.goos }}-${{ matrix.goarch }} - - name: Generate SHA256 checksum - run: make checksums - - name: Upload binaries uses: actions/upload-artifact@v5 with: name: backup-${{ matrix.goos }}-${{ matrix.goarch }} path: dist/backup-${{ matrix.goos }}-${{ matrix.goarch }} - - name: Upload SHA256 checksum files - uses: actions/upload-artifact@v5 - with: - name: sha256-checksums-${{ matrix.goos }}-${{ matrix.goarch }} - path: dist/*.sha256 - release: name: Publish Release needs: build diff --git a/Makefile b/Makefile index 0d1e07d..c81f5cc 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ BUILD_CMD = CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -tags=prod PACKAGE = ./backup/main.go COVERAGE_THRESHOLD = 98 -.PHONY: build clean test test-integration lint tidy checksums release sanity-check check-mod-tidy lint-config-check lint-fix format check-clean check-coverage +.PHONY: build clean test test-integration lint tidy release sanity-check check-mod-tidy lint-config-check lint-fix format check-clean check-coverage format: go fmt ./... @@ -55,21 +55,13 @@ release-%: @mkdir -p dist GOOS=$(word 1,$(subst -, ,$*)) GOARCH=$(word 2,$(subst -, ,$*)) $(BUILD_CMD) -o dist/backup-$* $(PACKAGE) -checksums: - @for file in dist/*; do \ - if [ "$${file##*.}" != "sha256" ]; then \ - sha256sum "$$file" > "$$file.sha256"; \ - fi; \ - done - -release: release-linux-amd64 release-darwin-amd64 release-windows-amd64 checksums +release: release-linux-amd64 release-darwin-amd64 release-windows-amd64 @echo - @echo "Binaries with sizes and checksums:" + @echo "Binaries with sizes:" @for file in dist/*; do \ - if [ -f "$$file" ] && [ "$${file##*.}" != "sha256" ]; then \ + if [ -f "$$file" ]; then \ size=$$(stat --printf="%s" "$$file"); \ - checksum=$$(cat "$$file.sha256" | awk '{print $$1}'); \ - printf "%-40s %-15s %-64s\n" "$$file" "Size: $$size bytes" "Checksum: $$checksum"; \ + printf "%-40s Size: %s bytes\n" "$$file" "$$size"; \ fi; \ done