Skip to content

Commit be5d2ec

Browse files
committed
fix: use --tag next for prerelease versions
1 parent 45b7578 commit be5d2ec

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
permissions:
11-
id-token: write # Required for OIDC trusted publishing
11+
id-token: write
1212
contents: write
1313

1414
jobs:
@@ -65,8 +65,14 @@ jobs:
6565
- run: npm run build
6666
- run: npm test
6767

68-
- name: Publish (trusted publishing via OIDC)
69-
run: npm publish
68+
- name: Publish
69+
run: |
70+
VERSION=$(node -p "require('./package.json').version")
71+
if [[ "$VERSION" == *"-"* ]]; then
72+
npm publish --tag next
73+
else
74+
npm publish
75+
fi
7076
7177
- name: Create tag
7278
run: |

0 commit comments

Comments
 (0)