···1717fi
18181919# --- Get version ---
2020+log_info "Fetching latest release information..."
2121+2222+# Get the latest tag from remote
2323+LATEST_TAG=$(git ls-remote --tags origin | grep -E 'refs/tags/v[0-9]+\.[0-9]+\.[0-9]+' | sed 's/.*refs\/tags\///' | sort -V | tail -1)
2424+2525+if [ -n "$LATEST_TAG" ]; then
2626+ LATEST_VERSION=${LATEST_TAG#v} # Remove 'v' prefix
2727+ log_info "Latest version on origin: $LATEST_VERSION"
2828+else
2929+ log_info "No previous releases found on origin"
3030+fi
3131+3232+echo ""
2033echo "Enter the version for the new release (e.g., 1.0.0):"
2134read -p "Version: " VERSION
2235···6275gh release create "$TAG_NAME" \
6376 --title "Release $TAG_NAME" \
6477 --notes "$RELEASE_NOTES" \
6565- --draft \
6666- $PRERELEASE_FLAG
7878+ --prerelease
67796868-log_success "Draft release $TAG_NAME created successfully!"
6969-log_info "The GitHub Actions workflow will now build and attach the artifacts."
7070-log_info "Once the build completes, you can publish the release at:"
8080+log_success "Pre-release $TAG_NAME created successfully!"
8181+log_info "The GitHub Actions workflow is now building and will attach the artifacts automatically."
8282+log_info "Once the build completes, you can promote it to a full release at:"
7183log_info "https://github.com/$(gh repo view --json owner,name -q '.owner.login + "/" + .name')/releases"
72847385echo ""
7486echo "To monitor the build progress:"
7575-echo "gh run list --workflow=release.yml" 8787+echo "gh run list --workflow=build-and-release.yml"