Skip to content

Commit 452b5ae

Browse files
committed
updates:
- update readme - bump dependencies - fix publish action
1 parent 910a08b commit 452b5ae

File tree

10 files changed

+1316
-800
lines changed

10 files changed

+1316
-800
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,16 @@ on:
55
- v*
66

77
jobs:
8-
wait:
9-
name: "Wait for tests"
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Wait for tests to succeed
13-
uses: lewagon/wait-on-check-action@latest
14-
with:
15-
ref: ${{ github.ref }}
16-
running-workflow-name: 'Test'
17-
check-regexp: Setup and test.*
188
publish:
199
name: Publish
2010
runs-on: ubuntu-latest
21-
needs: wait
2211
steps:
2312
- uses: actions/checkout@v4
13+
name: Checkout
2414
- uses: actions/setup-node@v4
2515
with:
2616
node-version: '20'
17+
registry-url: 'https://registry.npmjs.org'
2718
cache: 'npm'
2819
- name: publish to npm
2920
env:
@@ -33,18 +24,17 @@ jobs:
3324
REG_TAG="^$REG_TAG_PART$"
3425
REG_TAG_ALPHA="^$REG_TAG_PART-alpha[[:punct:]][[:digit:]]+$"
3526
27+
VERSION=$GITHUB_REF_NAME
3628
37-
if [[ $BRANCH_NAME =~ $REG_TAG ]]; then
38-
alias NPM_PUBLISH="npm publish"
39-
fi
29+
echo version: $VERSION
4030
4131
npm ci && npm run build
42-
npm version $BRANCH_NAME
43-
if [[ $BRANCH_NAME =~ $REG_TAG ]]; then
44-
npm publish
45-
elif [[ $BRANCH_NAME =~ $REG_TAG_ALPHA ]]; then
46-
npm publish --tag alpha
32+
npm version $VERSION --no-git-tag-version --allow-same-version
33+
if [[ $VERSION =~ $REG_TAG ]]; then
34+
npm publish -f
35+
elif [[ $VERSION =~ $REG_TAG_ALPHA ]]; then
36+
npm publish -f --tag alpha
4737
else
48-
echo invalid tag name: $BRANCH_NAME
38+
echo invalid tag name: $VERSION
4939
exit 1
5040
fi

0 commit comments

Comments
 (0)