3 Commits

2 changed files with 45 additions and 5 deletions

View File

@@ -111,13 +111,48 @@ jobs:
tar -czf ../cabinet-dist.tar.gz . tar -czf ../cabinet-dist.tar.gz .
- name: Publish release - name: Publish release
id: publish
if: steps.sync.outputs.changed == 'true' || github.event_name == 'workflow_dispatch' if: steps.sync.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
run: | run: |
TAG="build-$(date -u +%Y%m%d-%H%M%S)-$(git rev-parse --short HEAD)" # Тег как в апстриме (v1.63.0 и т.п.) вместо build-<timestamp> — меньше
# путаницы при сверке с апстримной версией. Если тег уже существует
# (повторный ручной запуск без нового апстримного коммита) — пересоздаём.
VERSION=$(node -p "require('./package.json').version")
TAG="v${VERSION}"
if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
gh release delete "$TAG" --repo "$GITHUB_REPOSITORY" --yes --cleanup-tag
fi
gh release create "$TAG" cabinet-dist.tar.gz \ gh release create "$TAG" cabinet-dist.tar.gz \
--repo "$GITHUB_REPOSITORY" \ --repo "$GITHUB_REPOSITORY" \
--title "$TAG" \ --title "$TAG" \
--notes "Автосборка: апстрим синхронизирован + локальный патч (скрыт блок «Дополнительные опции»)." \ --notes "Синхронизировано с апстримом (v${VERSION}) + локальный патч (скрыт блок «Дополнительные опции»)." \
--latest --latest
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
- name: Notify Telegram on new release
# TG_BOT_TOKEN/TG_CHAT_ID задаются в Settings → Secrets and variables →
# Actions, значения сюда не попадают.
if: success() && (steps.sync.outputs.changed == 'true' || github.event_name == 'workflow_dispatch')
env:
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }}
run: |
curl -s -X POST "https://api.telegram.org/bot${TG_BOT_TOKEN}/sendMessage" \
-d chat_id="${TG_CHAT_ID}" \
-d text="✅ Новая сборка кабинета готова: ${{ steps.publish.outputs.tag }} — https://github.com/${GITHUB_REPOSITORY}/releases/tag/${{ steps.publish.outputs.tag }}" \
> /dev/null
- name: Notify Telegram on failure
# Срабатывает, если упал любой предыдущий шаг (в первую очередь —
# конфликт при merge апстрима).
if: failure()
env:
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }}
run: |
curl -s -X POST "https://api.telegram.org/bot${TG_BOT_TOKEN}/sendMessage" \
-d chat_id="${TG_CHAT_ID}" \
-d text="⚠️ sync-and-build упал: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" \
> /dev/null

View File

@@ -1496,9 +1496,12 @@ export default function Subscription() {
</div> </div>
)} )}
{/* Additional Options (Buy Devices) */} {/* Additional Options (Buy Devices) — disabled on purpose. Wrapped (not
{false && edited in place) so future upstream changes to the condition/body
subscription && below merge cleanly instead of conflicting on this toggle. */}
{false && (
<>
{subscription &&
(subscription.is_active || subscription.is_limited) && (subscription.is_active || subscription.is_limited) &&
!subscription.is_trial && !subscription.is_trial &&
subscription.device_limit !== 0 && ( subscription.device_limit !== 0 && (
@@ -1577,6 +1580,8 @@ export default function Subscription() {
)} )}
</div> </div>
)} )}
</>
)}
{/* Reissue Subscription — standalone block, not dependent on device_limit */} {/* Reissue Subscription — standalone block, not dependent on device_limit */}
{subscription && {subscription &&