diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dc13585b..2723bb21 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -56,6 +56,11 @@ jobs: latest_release=$(echo "$releases" | jq -r --arg build_version "$build_version" 'map(select(.tagName | startswith($build_version))) | sort_by(.createdAt) | reverse | .[0] | .tagName') version_suffix=${latest_release#*$build_version-} + + if [ "$version_suffix" == "$build_version" ]; then + version_suffix="" + fi + echo "VERSION_SUFFIX=$version_suffix" >> $GITHUB_ENV env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index fa7df9c7..789f2a24 100644 --- a/README.md +++ b/README.md @@ -208,11 +208,11 @@ JsonPath expressions support basic methods calls. | Method | Description | Example |------------|--------------------------------------------------------|------------------------------------------------ -| `length()` | Returns the length of an array or string. | `$.store.book[?(@.title.length() > 5)]` -| `count()` | Returns the count of matching elements. | `$.store.book[?(@.authors.count() > 1)]` -| `match()` | Returns true if a string matches a regular expression. | `$.store.book[?(@.title.match('.*Century.*'))]` -| `search()` | Searches for a string within another string. | `$.store.book[?(@.title.search('Sword'))]` -| `value()` | Accesses the value of a key in the current object. | `$.store.book[?(@.price.value() < 10)]` +| `length()` | Returns the length of an array or string. | `$.store.book[?(length(@.title) > 5)]` +| `count()` | Returns the count of matching elements. | `$.store.book[?(count(@.authors) > 1)]` +| `match()` | Returns true if a string matches a regular expression. | `$.store.book[?(match(@.title, '.*Century.*'))]` +| `search()` | Searches for a string within another string. | `$.store.book[?(search(@.title, 'Sword'))]` +| `value()` | Accesses the value of a key in the current object. | `$.store.book[?(value(@.price) < 10)]` You can extend the supported function set by registering your own functions.