Files
oqyude b5618addb9
CI / Lint, Typecheck & Test (push) Successful in 2m46s
ci(gitea): релиз по тегу v* с main.js, manifest.json, styles.css
- workflows перенесены в .gitea/workflows (GitHub Actions на Gitea не исполнялись)
- runs-on: native — host-mode раннер ci-sapphira; без setup-node/cache: npm,
  так как на хосте нет tar/zstd, node 24/npm 11 берутся из PATH раннера
- ci.yml: push/PR в master/dev -> npm ci, lint, typecheck, test
- release.yml: тег v* -> сборка, сверка тега с manifest.json/package.json,
  публикация релиза через Gitea API
- scripts/publish-release.mjs: идемпотентная публикация трёх ассетов
- добавлен npm run typecheck
2026-11-27 15:22:11 +03:00

53 lines
1.2 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
name: Build & Publish
# Host-mode runner: label "native", host toolchain only (see ci.yml).
runs-on: native
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Toolchain
run: node -v && npm -v
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Lint
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Test
run: npm test
- name: Build
run: npm run build
- name: Verify tag matches manifest.json and package.json
run: |
tag="${GITHUB_REF_NAME#v}"
manifest="$(node -p "require('./manifest.json').version")"
pkg="$(node -p "require('./package.json').version")"
if [ "$tag" != "$manifest" ] || [ "$tag" != "$pkg" ]; then
echo "::error::Tag $tag does not match manifest.json ($manifest) / package.json ($pkg)"
exit 1
fi
echo "Version match: $tag"
- name: Publish release (main.js, manifest.json, styles.css)
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: node scripts/publish-release.mjs