Skip to content

Commit 2a76fcf

Browse files
committed
fix: create release before uploading wasm tarball
1 parent 6e1d858 commit 2a76fcf

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/release-wasm.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@ jobs:
9898
run: |
9999
echo "::warning::WASM npm publication is disabled. The package tarball will still be uploaded to the GitHub Release."
100100
101+
- name: Ensure GitHub Release exists
102+
env:
103+
GH_TOKEN: ${{ github.token }}
104+
INPUT_TAG_NAME: ${{ inputs.tag_name }}
105+
run: |
106+
TAG_NAME="${INPUT_TAG_NAME:-$GITHUB_REF_NAME}"
107+
gh release view "$TAG_NAME" --repo "${{ github.repository }}" \
108+
|| gh release create "$TAG_NAME" \
109+
--repo "${{ github.repository }}" \
110+
--title "$TAG_NAME" \
111+
--generate-notes
112+
101113
- name: Upload npm tarball to GitHub Release
102114
env:
103115
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)