Add CI and release workflows
CI / build (push) Canceled after 0s

CI runs svelte-check and a production build on every push. Tagged
releases package the contents of dist/ as a .tgz that untars directly
into a web root, with a checksum alongside.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Mateusz PstruchaandClaude Opus 5 committed 2026-09-22 19:55:18 +02:00
1 parent 1145e31af6
commit a20b0aa91d
2 files changed
+57

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
name: CI
on:
push:
branches: [master]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
container:
image: node:22-bookworm-slim
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- run: npm ci
- run: npm run check
- run: npm run build
+33
View File
@@ -0,0 +1,33 @@
name: Release
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
container:
image: node:22-bookworm-slim
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run check
- run: npm run build
- name: Package static build
run: |
VERSION="${GITHUB_REF_NAME#v}"
# Archive the *contents* of dist/ rather than dist/ itself, so it
# untars straight into an nginx web root.
tar -czf "tern-web-${VERSION}.tgz" -C dist .
sha256sum "tern-web-${VERSION}.tgz" > "tern-web-${VERSION}.tgz.sha256"
- name: Publish release
uses: akkuman/gitea-release-action@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
files: |-
tern-web-*.tgz
tern-web-*.tgz.sha256