File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -54,24 +54,25 @@ jobs:
5454 run : |
5555 # Use the provided tag for workflow_dispatch, or github.ref for push
5656 if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
57- REF="refs/tags/ ${{ github.event.inputs.tag }}"
57+ TAG=" ${{ github.event.inputs.tag }}"
5858 else
59- REF ="${{ github.ref }}"
59+ TAG ="${{ github.ref_name }}"
6060 fi
6161
62- dist host --steps=upload --steps=release --output-format=json "$REF" > dist-manifest.json || true
62+ # Try cargo-dist plan (newer API) - doesn't take ref argument anymore
63+ dist plan --output-format=json > dist-manifest.json 2>/dev/null || true
6364
64- # If cargo-dist plan fails, we'll still proceed with manual build
65- if [ -f dist-manifest.json ]; then
65+ # If cargo-dist plan fails or produces empty output, fallback to manual values
66+ if [ -f dist-manifest.json ] && [ -s dist-manifest.json ] && jq -e '.releases' dist-manifest.json >/dev/null 2>&1 ; then
6667 echo "dist-manifest.json:"
6768 cat dist-manifest.json
6869 DIST_TAG=$(jq -r '.announcement_tag // empty' dist-manifest.json)
6970 DIST_VERSION=$(jq -r '.announcement_title // empty' dist-manifest.json)
7071 HAS_RELEASES=$(jq '.releases | length' dist-manifest.json 2>/dev/null || echo "0")
7172 else
72- # Extract tag from REF
73- DIST_TAG="${REF#refs/tags/} "
74- DIST_VERSION="${DIST_TAG} "
73+ # Fallback: use tag directly
74+ DIST_TAG="$TAG "
75+ DIST_VERSION="$TAG "
7576 HAS_RELEASES="1"
7677 fi
7778
You can’t perform that action at this time.
0 commit comments