diff --git a/.github/workflows/dd-build.yaml b/.github/workflows/dd-build.yaml index 14f29d49457..ecd971fa1e6 100644 --- a/.github/workflows/dd-build.yaml +++ b/.github/workflows/dd-build.yaml @@ -18,7 +18,9 @@ jobs: with: fetch-depth: 0 - name: Set release version environment variable - run: echo RELEASE_VERSION=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV + run: | + echo RELEASE_VERSION=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV + echo RELEASE_VERSION_NO_V=${GITHUB_REF#refs/tags/v} >> $GITHUB_ENV env: GITHUB_REF: ${{ github.ref }} - name: Set target platform environment variable @@ -26,21 +28,9 @@ jobs: env: KUBE_BUILD_PLATFORM: ${{ matrix.platform }} - name: Build etcd - run: REPOSITORY=https://github.com/${{ env.GITHUB_REPOSITORY}}.git ./scripts/build-binary ${{ env.RELEASE_VERSION }} + run: REPOSITORY=https://github.com/${{ env.GITHUB_REPOSITORY}}.git ./scripts/release --no-upload --no-docker-push --in-place ${{ env.RELEASE_VERSION_NO_V }} env: GITHUB_REPOSITORY: ${{ github.repository }} - - name: Calculate checksums - id: calculate_checksums - shell: bash - working-directory: release/ - env: - ETCD_BUILD_PLATFORM: ${{ matrix.platform }} - run: | - TARGET_PLATFORM="${ETCD_BUILD_PLATFORM/\//-}" - for TARGET_FILE in *"${TARGET_PLATFORM}".tar.gz - do - sha256sum "$TARGET_FILE" > "${TARGET_FILE}.sha256sum" - done - uses: actions/upload-artifact@v4 with: name: etcd_output_${{ env.SANITIZED_TARGET_PLATFORM }} @@ -122,4 +112,14 @@ jobs: asset_path: ./_output/release-tars/etcd-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}.${{ matrix.extension }} asset_name: etcd-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}.${{ matrix.extension }} asset_content_type: application/tar+gzip + - name: Upload SHA256Sums + id: upload-sha256sums + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.release.outputs.upload_url }} + asset_path: ./_output/release-tars/etcd_output_checksums + asset_name: etcd_output_checksums + asset_content_type: text/plain