mirror of
https://github.com/cverinc/marktile.git
synced 2026-07-22 07:42:21 +00:00
chore: add release-integrity CI for the thin publish repo (#3)
No source lives here (the plugin is built in the private tile monorepo), so the meaningful check is release integrity, not a build: manifest required fields, manifest version present in versions.json with a matching minAppVersion, and that the bundled main.js parses. Adds scripts/test.sh (the single local entrypoint) and a CI workflow that runs it — matching the CVER per-repo standard, scoped to what a publish repo can actually verify. Co-authored-by: cverorg <292680828+cverorg@users.noreply.github.com>
This commit is contained in:
parent
a639408bfe
commit
51e2394da1
2 changed files with 38 additions and 0 deletions
18
.github/workflows/ci.yml
vendored
Normal file
18
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: release integrity
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- run: bash scripts/test.sh
|
||||
20
scripts/test.sh
Executable file
20
scripts/test.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
# Release-integrity check for this thin publish repo. The plugin is built in the
|
||||
# private tile monorepo; this repo only ships the artifacts (main.js, manifest,
|
||||
# styles, versions), so there is nothing to compile here. This mirrors CI:
|
||||
# validate manifest/versions consistency and that the bundled main.js parses.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
node -e '
|
||||
const fs = require("fs");
|
||||
const req = ["id","name","version","minAppVersion","description","author","isDesktopOnly"];
|
||||
const m = JSON.parse(fs.readFileSync("manifest.json","utf8"));
|
||||
for (const k of req) if (!(k in m)) throw new Error(`manifest.json missing "${k}"`);
|
||||
const v = JSON.parse(fs.readFileSync("versions.json","utf8"));
|
||||
if (!(m.version in v)) throw new Error(`manifest version ${m.version} is not listed in versions.json`);
|
||||
if (v[m.version] !== m.minAppVersion) throw new Error(`versions.json[${m.version}]=${v[m.version]} != manifest.minAppVersion=${m.minAppVersion}`);
|
||||
console.log(`manifest/versions OK — ${m.id} ${m.version} (minAppVersion ${m.minAppVersion})`);
|
||||
'
|
||||
node --check main.js
|
||||
echo "main.js parses OK"
|
||||
Loading…
Reference in a new issue