Skip to content

Commit

Permalink
GitHub Actions: Fix publication for package that does not yet exist (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnillovna authored Jun 21, 2024
1 parent 109ebff commit f96c711
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
if [[ ${{ github.ref }} == 'refs/heads/master' ]] || [[ ${{ github.ref }} == "refs/heads/release/"* ]]; then
changed_version='true'
job_name+=", and publish to NPM"
latest_pushed=$(curl --retry 3 -LsS https://registry.npmjs.org/${name} | jq -r '.time | with_entries(select(.key | test("^[0-9]+\\.[0-9]+\\.[0-9]+$"))) | keys | sort_by( values | split(".") | map(tonumber)) | last')
latest_pushed=$(curl --retry 3 -LsS https://registry.npmjs.org/${name} | jq -r '.time? | with_entries(select(.key | test("^[0-9]+\\.[0-9]+\\.[0-9]+$")))? | keys | sort_by( values | split(".") | map(tonumber)) | last')
newest_version=$(echo -e "$latest_pushed\n$current_version" | sort -V | tail -n1)
if [[ "${newest_version}" == "${current_version}" ]]; then
echo "latest=true" >> $GITHUB_OUTPUT
Expand Down
4 changes: 2 additions & 2 deletions source/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/web/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@datagrok/js-draw-lite",
"name": "@datagrok-libraries/js-draw-lite",
"friendlyName": "JsDrawLite",
"version": "0.0.1",
"description": "JSDraw.Lite forked from http://www.scilligence.com/",
Expand Down

0 comments on commit f96c711

Please sign in to comment.