diff --git a/.dockerignore b/.dockerignore index eaf4e6cbf..a21b7936a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ .git/ bin/ +dist/ tests/node-client/node_modules/ diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fb5d31bf4..65b422ce9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,10 +25,10 @@ jobs: ${{ runner.os }}-go- - name: Build - run: make -f builder.Makefile cross + run: make -f builder.Makefile package - uses: ncipollo/release-action@v1 with: - artifacts: "bin/*" + artifacts: "dist/*" prerelease: true token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index e660fd93d..a5d8f7237 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ bin/ +dist/ diff --git a/builder.Makefile b/builder.Makefile index 36f5e74ca..fc5697d4f 100644 --- a/builder.Makefile +++ b/builder.Makefile @@ -37,6 +37,11 @@ ifdef BUILD_TAGS TAGS=-tags $(BUILD_TAGS) endif +TAR_TRANSFORM:=--transform s/packaging/docker/ --transform s/bin/docker/ +ifneq ($(findstring bsd,$(shell tar --version)),) + TAR_TRANSFORM=-s /packaging/docker/ -s /bin/docker/ +endif + all: cli .PHONY: protos @@ -73,3 +78,9 @@ check-license-headers: check-go-mod: ./scripts/validate/check-go-mod +.PHONY: package +package: cross + mkdir -p dist + tar -czf dist/docker-linux-amd64.tar.gz $(TAR_TRANSFORM) packaging/LICENSE $(BINARY)-linux-amd64 + tar -czf dist/docker-darwin-amd64.tar.gz $(TAR_TRANSFORM) packaging/LICENSE $(BINARY)-darwin-amd64 + rm -f dist/docker-windows-amd64.zip && zip dist/docker-windows-amd64.zip -j packaging/LICENSE $(BINARY)-windows-amd64.exe diff --git a/packaging/LICENSE b/packaging/LICENSE new file mode 100644 index 000000000..fcf6aa892 --- /dev/null +++ b/packaging/LICENSE @@ -0,0 +1,2 @@ +The Docker End User License Agreement (https://www.docker.com/legal/docker-software-end-user-license-agreement) describes Docker's Terms for this software. +By downloading, accessing, or using this software you expressly accept and agree to the Terms set out in the Docker End User License Agreement.