Skip to content

Commit

Permalink
Try fixing script
Browse files Browse the repository at this point in the history
  • Loading branch information
ajthinking committed Aug 1, 2023
1 parent be0dd38 commit c7868c1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/publish_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ jobs:
id: check
run: |
PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
RESPONSE=$(curl --silent --head https://registry.npmjs.org/@data-story/core/$PACKAGE_VERSION) || true
if [ $? -eq 0 ]; then
echo "Version: $PACKAGE_VERSION"
HTTP_STATUS=$(curl --silent --head --write-out "%{http_code}" --output /dev/null https://registry.npmjs.org/@data-story/core/$PACKAGE_VERSION)
if [ $HTTP_STATUS -eq 200 ]; then
echo "Version $PACKAGE_VERSION already exists. Exiting the action script."
exit 0
echo "exit0 here but ignoring it"
else
echo "Version does not exist."
fi
- name: remove overlying workspace
Expand All @@ -42,9 +45,6 @@ jobs:

- name: Bundle
run: npx webpack

- name: Version
run: npm version patch -m "Upgrade to %s"

- name: Publish
run: npm publish
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish_ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ jobs:
id: check
run: |
PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
RESPONSE=$(curl --silent --head https://registry.npmjs.org/@data-story/ui/$PACKAGE_VERSION) || true
if [ $? -eq 0 ]; then
echo "Version: $PACKAGE_VERSION"
HTTP_STATUS=$(curl --silent --head --write-out "%{http_code}" --output /dev/null https://registry.npmjs.org/@data-story/ui/$PACKAGE_VERSION)
if [ $HTTP_STATUS -eq 200 ]; then
echo "Version $PACKAGE_VERSION already exists. Exiting the action script."
exit 0
echo "exit0 here but ignoring it"
else
echo "Version does not exist."
fi
- name: remove overlying workspace
Expand All @@ -45,9 +48,6 @@ jobs:

- name: Bundle
run: npx webpack

- name: Version
run: npm version patch -m "Upgrade to %s"

- name: Publish
run: npm publish
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@data-story/core",
"version": "0.0.63",
"version": "0.0.64",
"main": "dist/index.js",
"type": "commonjs",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@data-story/ui",
"version": "0.0.54",
"version": "0.0.55",
"main": "./dist/bundle.js",
"types": "./dist/index.d.ts",
"type": "commonjs",
Expand Down

0 comments on commit c7868c1

Please sign in to comment.