diff --git a/.github/workflows/build-binary-package.yml b/.github/workflows/build-binary-package.yml index 2fee0cc..0e2b38b 100644 --- a/.github/workflows/build-binary-package.yml +++ b/.github/workflows/build-binary-package.yml @@ -31,11 +31,11 @@ jobs: - name: Build all versions run: | - make platform-all + make vendor platform-all - name: Upload to release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | tag_name="${GITHUB_REF##*/}" - hub release edit $(find . -name "$PROGRAM_NAME*" -maxdepth 1 -printf "-a %p ") -m "" "$tag_name" + hub release edit $(find . -name "$PROGRAM_NAME*" -maxdepth 1 -printf "-a %p ") -a vendor.tgz -m "" "$tag_name" diff --git a/.gitignore b/.gitignore index f7ba645..67482f4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,10 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out -# Dependency directories (remove the comment below to include it) -# vendor/ +# Dependencies are not vendored by default, but a tarball is created by "make vendor" +# and provided in the release. Used by freebsd, gentoo, etc. +vendor/ +vendor.tgz # Python __pycache__/ diff --git a/Makefile b/Makefile index 616253d..59d1962 100644 --- a/Makefile +++ b/Makefile @@ -94,6 +94,15 @@ func-tests: build RELDIR = $(BINARY_NAME)-$(BUILD_VERSION) +.PHONY: vendor +vendor: + $(GOCMD) mod vendor + tar czf vendor.tgz vendor + +.PHONY: vendor-remove +vendor-remove: + $(RM) -r vendor vendor.tgz + # Called during platform-all, to reuse the directory for other platforms .PHONY: clean-release-dir clean-release-dir: