From e5d6be77aac535506afe3a668b0f23330a6cd944 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Fri, 20 Aug 2021 10:46:23 +0200 Subject: [PATCH] ci: wait for published before executing post release steps --- .github/workflows/POST_RELEASE.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/POST_RELEASE.yml b/.github/workflows/POST_RELEASE.yml index ef43b553..28341628 100644 --- a/.github/workflows/POST_RELEASE.yml +++ b/.github/workflows/POST_RELEASE.yml @@ -16,6 +16,26 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Set TAG + run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + - name: Wait for published + run: | + i=0 + pkg="bpmn-js@${{ env.TAG }}" + + until [ $i -gt 10 ] + do + echo "Checking for $pkg in npm registry..." + + info=$(npm info $pkg) + if [[ "$info" != "" ]]; then + echo "Found." + break + fi + + ((i++)) + sleep 15s + done - name: Use Node.js uses: actions/setup-node@v2 with: @@ -29,8 +49,6 @@ jobs: restore-keys: | ${{ runner.OS }}-node- ${{ runner.OS }}- - - name: Set TAG - run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV - name: Check for stable release run: | if [[ ${{ env.TAG }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]