Files
prettier-config/.github/workflows/publish.yml
Дмитрий 9a5d0f3f54
Some checks failed
Publish / Publish Job (push) Failing after 13s
fix: test workflow
2026-03-26 10:12:11 +03:00

39 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Publish
on:
push:
branches:
- main
jobs:
publish:
name: Publish Job
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Check Secret and Configure NPM
run: |
# 1. Проверяем, видит ли Runner наш токен
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "❌ ОШИБКА: Секрет NPM_TOKEN пустой! Runner его не получил."
exit 1
else
echo "✅ Секрет NPM_TOKEN успешно доставлен в Runner!"
fi
# 2. Настраиваем npm напрямую через встроенные команды (самый надежный способ)
npm config set @lendry-erp:registry https://git.lendry.ru/api/packages/lendry-erp/npm/
npm config set //git.lendry.ru/api/packages/lendry-erp/npm/:_authToken "${{ secrets.NPM_TOKEN }}"
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}