Files
phitandClaude Opus 5.5 9890a7677e build: add Biome and git-cliff, generate release notes from commits
Biome lints and formats (npm run check / fix), and CI fails on
violations. Releases now use git-cliff notes grouped by Conventional
Commits prefix instead of GitHub's PR-based notes, which were empty
for direct pushes. Document the commit convention and release steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 23:45:11 +02:00

47 lines
1.3 KiB
YAML

name: Build
on:
push:
branches: [main]
tags: ['v*']
pull_request:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # create releases for tags
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # git-cliff needs the tags and history for release notes
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npx biome ci .
- run: npm run build
# unzips to a folder that can be loaded unpacked
- uses: actions/upload-artifact@v7
with:
name: video2webxr
path: dist/
- name: Release
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ github.token }}
run: |
version=$(node -p "require('./dist/manifest.json').version")
if [ "v$version" != "$GITHUB_REF_NAME" ]; then
echo "::error::tag $GITHUB_REF_NAME doesn't match manifest version $version"
exit 1
fi
(cd dist && zip -r "../video2webxr-$version.zip" .)
npx git-cliff --latest --strip all > notes.md
gh release create "$GITHUB_REF_NAME" "video2webxr-$version.zip" --title "video2webxr $version" --notes-file notes.md