ci(gitea): релиз по тегу v* с main.js, manifest.json, styles.css
CI / Lint, Typecheck & Test (push) Successful in 2m46s

- 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
This commit is contained in:
oqyude committed 2026-11-27 15:22:11 +03:00
1 parent 7cc89afbf7
commit b5618addb9
5 files changed
+213 -89

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
name: CI
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
permissions:
contents: read
jobs:
ci:
name: Lint, Typecheck & Test
# Host-mode Gitea runner is registered with the single label "native".
# It runs directly on the host: no Docker, no tar/zstd, no preinstalled
# tool-cache. Use the host toolchain (node + npm) instead of setup-node.
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
+52
View File
@@ -0,0 +1,52 @@
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