Skip to content

Commit

Permalink
Make sure that @asciidoctor/core has been published on npmjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Jun 24, 2023
1 parent 102e12f commit 0c7bea3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: ./scripts/publish.sh
- name: Make sure that @asciidoctor/core has been published on npmjs
run: |
timeout 60s ./scripts/wait-asciidoctor-core-published.sh
- name: Produce binaries
run: ./scripts/binaries.sh
# create the GitHub release
Expand Down
19 changes: 19 additions & 0 deletions scripts/wait-asciidoctor-core-published.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

SCRIPT=`realpath $0`
SCRIPT_PATH=`dirname ${SCRIPT}`

cd "$SCRIPT_PATH"
cd ../packages/asciidoctor

ASCIIDOCTOR_CORE_VERSION=$(node -e 'console.log(require("./package.json").dependencies["@asciidoctor/core"])')

until [ $(npm view @asciidoctor/core version) = "$ASCIIDOCTOR_CORE_VERSION" ];
do
echo "Waiting for @asciidoctor/core $ASCIIDOCTOR_CORE_VERSION to be published..."
sleep 5s
done

echo "@asciidoctor/core $ASCIIDOCTOR_CORE_VERSION is published!"
echo "npm view @asciidoctor/core version"
npm view @asciidoctor/core version

0 comments on commit 0c7bea3

Please sign in to comment.