Skip to content

Commit 04426fd

Browse files
chore: sync workflows
1 parent 2d9b575 commit 04426fd

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,22 @@ jobs:
140140
fi
141141
env:
142142
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
143-
144143
- uses: actions/checkout@v2
145144
if: env.RUNNING
145+
- name: Set running flag
146+
run: npx can-npm-publish || echo "::set-env name=RUNNING::"
147+
if: env.RUNNING && matrix.target == 'npm'
148+
- name: Set running flag
149+
run: |
150+
LATEST=`npm view . version`
151+
CURRENT=`cat package.json | jq -r .version`
152+
if [ "$LATEST" = "$CURRENT" ]; then
153+
echo "::set-env name=RUNNING::"
154+
fi
155+
env:
156+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157+
if: env.RUNNING && matrix.target == 'gpr'
158+
146159
- name: Setup Node.js
147160
uses: actions/setup-node@v1
148161
with:

0 commit comments

Comments
 (0)