Some checks failed
/ publish (push) Failing after 6m41s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
29 lines
No EOL
1.1 KiB
Makefile
29 lines
No EOL
1.1 KiB
Makefile
ARCH := amd64 arm64
|
|
OS := linux windows darwin
|
|
NAME := password
|
|
AUTH_HEADER := Authorization: token ${GITHUB_TOKEN}
|
|
|
|
.PHONY: all build_password publish_password
|
|
|
|
all: build_password publish_password
|
|
|
|
build_password:
|
|
$(foreach GOOS, ${OS},\
|
|
$(foreach GOARCH, ${ARCH}, \
|
|
$(shell CGO_ENABLED=0 go build -v -o bin/${NAME} ./golang/cmd/passwordhash;cd bin/;[ "${GOOS}" = "windows" ] && mv ${NAME} ${NAME}.exe;tar czf ${NAME}_${GOOS}_${GOARCH}.tar.gz *;rm -f ${NAME} ${NAME}.exe) \
|
|
))
|
|
|
|
publish_password:
|
|
$(shell curl -vvv -H "${AUTH_HEADER}" -X DELETE ${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/${NAME}/${VER})
|
|
$(foreach GOOS, ${OS}, \
|
|
$(foreach GOARCH, ${ARCH}, \
|
|
$(echo "token: ${{ secrets.PACKAGES }}") \
|
|
$(info Uploading ${NAME}_${GOOS}_${GOARCH}.tar.gz) \
|
|
$(shell curl -vvv --user "nicolas.boufidjeline:${{ secrets.PACKAGES }}" --upload-file bin/${NAME}_${GOOS}_${GOARCH}.tar.gz ${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/${NAME}/${VER}/${NAME}_${GOOS}_${GOARCH}.tar.gz) \
|
|
) \
|
|
)
|
|
|
|
clean:
|
|
rm -rf bin
|
|
|
|
re: clean all |