initial commit
All checks were successful
CI / Check Dist (pull_request) Successful in 11s
CI / Test (pull_request) Successful in 56s
CI / Dry-Run (pull_request) Successful in 11s

This commit is contained in:
2025-08-17 21:28:44 +02:00
parent 4eefc46a2f
commit 17c1cd8a41
16 changed files with 6804 additions and 1 deletions

26
.gitea/workflows/cd.yaml Normal file
View File

@@ -0,0 +1,26 @@
name: CD
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- name: Increment tag
id: increment-tag
uses: ./
with:
token: ${{ secrets.GITEA_TOKEN }}
- name: Push tag
run: |
git tag ${{ steps.increment-tag.outputs.new-tag }}
git push origin ${{ steps.increment-tag.outputs.new-tag }}

63
.gitea/workflows/ci.yaml Normal file
View File

@@ -0,0 +1,63 @@
name: CI
on:
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- name: Format code
run: npm run format
- name: Typecheck
run: npm run typecheck
- name: Run test
run: npm run test
check-dist:
name: Check Dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- run: mv dist dist_orig
- run: npm run build
- run: |
original_hash=$(sha256sum dist_orig/index.js | cut -d' ' -f1)
new_hash=$(sha256sum dist/index.js | cut -d' ' -f1)
if [ "$original_hash" != "$new_hash" ]; then
echo "Build is not up to date. Original hash: $original_hash, new hash: $new_hash"
exit 1
fi
dry-run:
name: Dry-Run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- name: Increment tag
id: increment-tag
uses: ./
with:
token: ${{ secrets.GITEA_TOKEN }}
- name: Print new tag
run: |
if [ -z "${{ steps.increment-tag.outputs.new-tag }}" ]; then
echo "No new tag found"
exit 1
fi
echo "New tag: ${{ steps.increment-tag.outputs.new-tag }}"