fix: NPM_TAG

This commit is contained in:
2026-04-01 19:01:37 +03:00
parent 1ff20e76d3
commit 685e267776
2 changed files with 4 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pkgxdev/dev@v1
- uses: https://git.it3.su/actions/pulumi-npm-release@v1
- uses: https://git.it3.su/actions/pulumi-npm-release@main
with:
package_dir: src/sdk
npm_config_registry_auth: ${{ secrets.NPM_CONFIG_REGISTRY_AUTH }}

View File

@@ -6,7 +6,7 @@ env:
NPM_TAG:
sh: |
tag=dev
if [[ "$GITHUB_REF_NAME" = "v*" ]]; then
if [[ "$GITHUB_REF_NAME" = "v"* ]] || [[ "$GITHUB_REF_NAME" = "main" ]]; then
tag=latest
fi
echo "$tag"
@@ -68,8 +68,9 @@ tasks:
cmd: |
name=$(npm pkg get name | tr -d '"')
version=$(npm pkg get version | tr -d '"')
#npm dist-tag rm "$name" "$NPM_TAG" || true
npm dist-tag rm "$name" "$NPM_TAG" || true
npm unpublish "$name@$version" --force || true
sleep 1
base:npm:publish:
desc: "Публикация"