Files
conventional-semantic-git-t…/.gitea/workflows/ci.yaml
Timo Behrendt 370fbd39a3
All checks were successful
CD / Release (push) Successful in 39s
chore: initial-commit (#1)
Reviewed-on: #1
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-08-17 22:52:19 +02:00

66 lines
1.6 KiB
YAML

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
with:
fetch-depth: 0
- 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 }}"