Skip to content

Commit 95791f9

Browse files
committed
ensure we build dist before release
1 parent e324ec4 commit 95791f9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,20 @@ jobs:
2525
# Get tag name from event
2626
tag_name="${{ github.event.release.tag_name }}"
2727
28+
if [[ ! "$tag_name" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
29+
cd $(echo $tag_name | rev | cut -d'/' -f2- | rev)
30+
fi
31+
32+
# Build package
33+
yarn build
34+
2835
cmd="yarn npm publish --access public"
2936
if [ "${{ github.event.release.prerelease }}" == "true" ]; then
3037
cmd+=" --tag=beta"
3138
else
3239
cmd+=" --tag=latest"
3340
fi
3441
35-
if [[ "$tag_name" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
36-
eval $cmd
37-
else
38-
cd $(echo $tag_name | rev | cut -d'/' -f2- | rev)
39-
eval $cmd
40-
fi
42+
eval $cmd
4143
env:
4244
YARN_NPM_AUTH_TOKEN: ${{ secrets.YARN_NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)