From 37dfc3a57f550fd0c06d5a14bc49ea4cb4b05f2d Mon Sep 17 00:00:00 2001 From: Matthew Endsley Date: Fri, 1 Nov 2024 04:27:38 -0700 Subject: [PATCH] Archive release and set proper version --- .github/workflows/dockerd.yml | 11 ++++++++++- hack/make.ps1 | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerd.yml b/.github/workflows/dockerd.yml index f1c19a9b61236..79dda61e03e88 100644 --- a/.github/workflows/dockerd.yml +++ b/.github/workflows/dockerd.yml @@ -116,6 +116,7 @@ jobs: name: Build binaries run: | & docker run --name ${{ env.TEST_CTN_NAME }} -e "DOCKER_GITCOMMIT=${{ github.sha }}" ` + -e "DOCKER_VERSION=${{ needs.prepare.outputs.tag }}" ` -v "${{ github.workspace }}\go-build:C:\Users\ContainerAdministrator\AppData\Local\go-build" ` -v "${{ github.workspace }}\go\pkg\mod:C:\gopath\pkg\mod" ` ${{ env.TEST_IMAGE_NAME }} hack\make.ps1 -Daemon -Client @@ -152,6 +153,14 @@ jobs: name: List artifacts run: | tree -nh ${{ env.BIN_OUT }} + - + name: Archive artifacts + run: | + tar czvf "${{ env.BIN_OUT }}/docker-${{ needs.prepare.outputs.tag }}.windows-amd64.tar.gz" --sort=name ${{ env.BIN_OUT }} + - + name: List artifacts + run: | + tree -nh ${{ env.BIN_OUT }} - name: GitHub Release if: startsWith(github.ref, 'refs/tags/v') @@ -160,5 +169,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: draft: true - files: ${{ env.BIN_OUT }}/* + files: ${{ env.BIN_OUT }}/*.tar.gz name: ${{ needs.prepare.outputs.tag }} diff --git a/hack/make.ps1 b/hack/make.ps1 index 1893583c303dd..58bd1dbfb5326 100644 --- a/hack/make.ps1 +++ b/hack/make.ps1 @@ -463,7 +463,7 @@ Try { if ($CommitSuffix -ne "") { $gitCommit += "-"+$CommitSuffix -Replace ' ', '' } # Get the version of docker (eg 17.04.0-dev) - $dockerVersion="0.0.0-dev" + $dockerVersion="$env:DOCKER_VERSION" # Overwrite dockerVersion if VERSION Environment variable is available if (Test-Path Env:\VERSION) { $dockerVersion=$env:VERSION }