mirror of
https://github.com/coredns/coredns.git
synced 2026-04-05 03:35:33 -04:00
Update github workflow to release windows builds in zip format. (#7946)
* feat: Add GitHub Actions workflow for drafting releases and update Makefile to build Windows releases as zip archives. Signed-off-by: John-Michael Mulesa <jmulesa@gmail.com> * Generate both tgz and zip for Windows to support any existing workflows. Signed-off-by: John-Michael Mulesa <jmulesa@gmail.com> --------- Signed-off-by: John-Michael Mulesa <jmulesa@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e8db7e155e
commit
92a6ae7079
@@ -85,6 +85,7 @@ tar:
|
||||
tar -zcf release/$(NAME)_$(VERSION)_darwin_amd64.tgz -C build/darwin/amd64 $(NAME)
|
||||
tar -zcf release/$(NAME)_$(VERSION)_darwin_arm64.tgz -C build/darwin/arm64 $(NAME)
|
||||
tar -zcf release/$(NAME)_$(VERSION)_windows_amd64.tgz -C build/windows/amd64 $(NAME).exe
|
||||
zip -j release/$(NAME)_$(VERSION)_windows_amd64.zip build/windows/amd64/$(NAME).exe
|
||||
for arch in $(LINUX_ARCH); do \
|
||||
tar -zcf release/$(NAME)_$(VERSION)_linux_$$arch.tgz -C build/linux/$$arch $(NAME) ;\
|
||||
done
|
||||
@@ -97,15 +98,15 @@ else
|
||||
@echo Releasing: $(VERSION)
|
||||
@$(eval RELEASE:=$(shell curl -s -d '{"tag_name": "v$(VERSION)", "name": "v$(VERSION)"}' -H "Authorization: token ${GITHUB_ACCESS_TOKEN}" "https://api.github.com/repos/$(GITHUB)/$(NAME)/releases" | grep -m 1 '"id"' | tr -cd '[[:digit:]]'))
|
||||
@echo ReleaseID: $(RELEASE)
|
||||
@( cd release; for asset in `ls -A *tgz`; do \
|
||||
@( cd release; for asset in `ls -A *.tgz *.zip`; do \
|
||||
echo $$asset; \
|
||||
curl -o /dev/null -X POST \
|
||||
-H "Content-Type: application/gzip" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
-H "Authorization: token ${GITHUB_ACCESS_TOKEN}" \
|
||||
--data-binary "@$$asset" \
|
||||
"https://uploads.github.com/repos/$(GITHUB)/$(NAME)/releases/$(RELEASE)/assets?name=$${asset}" ; \
|
||||
done )
|
||||
@( cd release; for asset in `ls -A *tgz`; do \
|
||||
@( cd release; for asset in `ls -A *.tgz *.zip`; do \
|
||||
sha256sum $$asset > $$asset.sha256; \
|
||||
done )
|
||||
@( cd release; for asset in `ls -A *sha256`; do \
|
||||
|
||||
Reference in New Issue
Block a user