Skip to content

Commit 7a5fc07

Browse files
authored
ci: set version into package.json
1 parent 0b36784 commit 7a5fc07

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,18 @@ jobs:
3838
- name: Publish to NPM
3939
working-directory: './dist/'
4040
run: |
41-
# Определяем тег на основе версии
42-
TAG="latest"
4341
VERSION=${{ github.ref_name }}
42+
CLEAN_VERSION=${VERSION#v}
43+
44+
# Sync version with release tag
45+
npm version $CLEAN_VERSION --no-git-tag-version
46+
47+
# Determine dist-tag
48+
TAG="latest"
4449
if [[ "$VERSION" == *"next"* ]]; then
4550
TAG="next"
4651
elif [[ "$VERSION" == *"rc"* ]]; then
4752
TAG="rc"
4853
fi
4954
50-
# Публикуем (provenance добавится автоматически)
5155
npm publish --tag $TAG --access public

0 commit comments

Comments
 (0)