chore(release): v0.5.3 — rapikan dokumentasi, CI, dan workflow rilis
Some checks are pending
CI / test (push) Waiting to run
Release / release (push) Successful in 35s

- bump versi 0.5.3 (version.txt, package.json)
- CHANGELOG: catatan 0.5.3 + arsip 0.5.2
- README: tautan Gitea/Forgejo baru, badge versi, bagian screenshot, fitur baru
- docs/RELEASE_NOTES_v0.5.3.md
- workflow CI (syntax + unit test) dan Release (buat rilis + asset zip) untuk Gitea & Forgejo
This commit is contained in:
oxpoe
2026-11-05 03:32:03 +07:00
parent 2b35ee3f99
commit 6e2bf3fe93
9 changed files with 274 additions and 15 deletions

33
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,33 @@
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Check syntax (semua file JS)
shell: bash
run: |
fail=0
while IFS= read -r f; do
node --check "$f" || { echo "SYNTAX FAIL: $f"; fail=1; }
done < <(find . -name '*.js' -not -path './node_modules/*' -not -path './.git/*' -not -path './public/vendor/*')
exit $fail
- name: Unit tests
run: node tests/unit/area-access.test.js

View File

@@ -0,0 +1,45 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build archive & release
shell: bash
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
VERSION="${TAG#v}"
NOTES="docs/RELEASE_NOTES_v${VERSION}.md"
python3 - "$TAG" "$NOTES" > payload.json <<'PY'
import json, os, sys
tag, notes = sys.argv[1], sys.argv[2]
body = open(notes, encoding="utf-8").read() if os.path.exists(notes) else "Rilis " + tag
print(json.dumps({"tag_name": tag, "name": tag, "body": body, "draft": False, "prerelease": False}))
PY
git archive --format=zip --prefix="open-isp-${VERSION}/" -o "/tmp/open-isp-${VERSION}.zip" HEAD
ID=$(curl -fsS -X POST "$API/releases" \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d @payload.json | python3 -c 'import sys, json; print(json.load(sys.stdin)["id"])')
curl -fsS -X POST "$API/releases/$ID/assets?name=open-isp-${VERSION}.zip" \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/zip" \
--data-binary "@/tmp/open-isp-${VERSION}.zip"
echo "Release $TAG dibuat dengan asset open-isp-${VERSION}.zip"