mirror of
https://github.com/Warky-Devs/artemis-kit.git
synced 2026-11-10 06:18:47 +00:00
Add collection and sorting utilities with Gitea release workflows
CI / test-and-build (push) Successful in 30s
CI / test-and-build (push) Successful in 30s
Replace retrocycle eval calls with property traversal and regression coverage. Add bundle budgets, eval guards, package publishing, and contributor documentation.
This commit is contained in:
1 parent
34be59ba01
commit
538ec38632
17 files changed
+545
-12
No files matched your search
@@ -0,0 +1,15 @@
|
||||
name: CI
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
test-and-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@v4
|
||||
- uses: https://github.com/pnpm/action-setup@v4
|
||||
- uses: https://github.com/actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm test
|
||||
- run: pnpm check:bundle
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Publish package
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PACKAGE_REGISTRY: https://git.warky.dev/api/packages/${{ gitea.repository_owner }}/npm/
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@v4
|
||||
- uses: https://github.com/pnpm/action-setup@v4
|
||||
- uses: https://github.com/actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
registry-url: https://git.warky.dev/api/packages/${{ gitea.repository_owner }}/npm/
|
||||
scope: '@warkypublic'
|
||||
cache: pnpm
|
||||
- name: Verify release tag
|
||||
env:
|
||||
RELEASE_REF: ${{ gitea.ref }}
|
||||
run: |
|
||||
node --input-type=module <<'JS'
|
||||
import { readFileSync } from 'node:fs';
|
||||
const { version } = JSON.parse(readFileSync('package.json', 'utf8'));
|
||||
if (process.env.RELEASE_REF !== `refs/tags/v${version}`) {
|
||||
throw new Error(`Release tag must be v${version} to match package.json`);
|
||||
}
|
||||
JS
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm test
|
||||
- run: pnpm check:bundle
|
||||
- name: Publish to Gitea Packages
|
||||
env:
|
||||
# npm uses token authentication; PACKAGE_REGISTRY_USERNAME is not required.
|
||||
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}
|
||||
run: |
|
||||
set -eu
|
||||
: "${NODE_AUTH_TOKEN:?Set the PACKAGE_REGISTRY_TOKEN Actions secret with package write access}"
|
||||
version=$(node -p "require('./package.json').version")
|
||||
case "$version" in
|
||||
*-*) dist_tag=next ;;
|
||||
*) dist_tag=latest ;;
|
||||
esac
|
||||
pnpm publish --no-git-checks --registry "$PACKAGE_REGISTRY" --tag "$dist_tag"
|
||||
Reference in new issue
Block a user