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:
1 parent
1145e31af6
commit
a20b0aa91d
2 files changed
+57
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user