diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d29991c..3ee5ba0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,8 +66,15 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - gh release create "${GITHUB_REF_NAME}" \ - --repo "${GITHUB_REPOSITORY}" \ - --title "${GITHUB_REF_NAME}" \ - --generate-notes \ - dist/* + if gh release view "${GITHUB_REF_NAME}" --repo "${GITHUB_REPOSITORY}" >/dev/null 2>&1; then + gh release upload "${GITHUB_REF_NAME}" \ + --repo "${GITHUB_REPOSITORY}" \ + --clobber \ + dist/* + else + gh release create "${GITHUB_REF_NAME}" \ + --repo "${GITHUB_REPOSITORY}" \ + --title "${GITHUB_REF_NAME}" \ + --generate-notes \ + dist/* + fi