From 308a8121a353a89024e47048a80d119a7a158fab Mon Sep 17 00:00:00 2001 From: diqierjia Date: Tue, 1 Sep 2026 14:28:06 +0800 Subject: [PATCH] ci: publish evergreen DSH release asset --- .github/workflows/release-dsh.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-dsh.yml b/.github/workflows/release-dsh.yml index 5439cc2..fb454ac 100644 --- a/.github/workflows/release-dsh.yml +++ b/.github/workflows/release-dsh.yml @@ -48,14 +48,24 @@ jobs: - run: npm run test:dsh - run: npm run build:dsh - run: npm run verify:dsh - - run: npm publish --workspace stratagate-dsh --provenance --access public + - name: Pack release assets from one artifact + shell: bash + run: | + version="$(node -p 'require("./integrations/deepseek-harness/package.json").version')" + versioned="stratagate-dsh-${version}.tgz" + npm pack --workspace stratagate-dsh --silent + test -f "$versioned" + cp "$versioned" stratagate-dsh.tgz + cmp "$versioned" stratagate-dsh.tgz + echo "VERSION=$version" >> "$GITHUB_ENV" + - name: Publish exact package artifact + run: npm publish "stratagate-dsh-${VERSION}.tgz" --provenance --access public - name: Create GitHub release env: GH_TOKEN: ${{ github.token }} shell: bash run: | - version="$(node -p 'require("./integrations/deepseek-harness/package.json").version')" - gh release create "$GITHUB_REF_NAME" --verify-tag --generate-notes --title "StrataGate DSH $version" + gh release create "$GITHUB_REF_NAME" "stratagate-dsh-${VERSION}.tgz" stratagate-dsh.tgz --verify-tag --generate-notes --title "StrataGate DSH $VERSION" publish-artifact: if: github.event_name == 'workflow_dispatch' @@ -81,6 +91,8 @@ jobs: tar -xOf "$filename" package/package.json > package-manifest.json test "$(node -p 'require("./package-manifest.json").name')" = "stratagate-dsh" test "$(node -p 'require("./package-manifest.json").version')" = "$VERSION" + cp "$filename" stratagate-dsh.tgz + cmp "$filename" stratagate-dsh.tgz - name: Publish exact package artifact run: npm publish "stratagate-dsh-${VERSION}.tgz" --provenance --access public - name: Create GitHub release with verified artifact @@ -88,4 +100,4 @@ jobs: run: | tag="stratagate-dsh-v${VERSION}" filename="stratagate-dsh-${VERSION}.tgz" - gh release create "$tag" "$filename" --repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" --generate-notes --title "StrataGate DSH $VERSION" + gh release create "$tag" "$filename" stratagate-dsh.tgz --repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" --generate-notes --title "StrataGate DSH $VERSION"