Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

Add CI/CD workflows with parallel jobs and release automation

morlutoff0cbf9ee205
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..4412a4e03
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,104 @@
+name: CI
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+jobs:
+ typecheck:
+ name: Typecheck
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm run typecheck
+
+ lint:
+ name: Lint (oxlint)
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm run lint
+
+ format:
+ name: Format Check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm run format:check
+
+ dead-code:
+ name: Dead Code (knip)
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm run knip
+
+ duplicates:
+ name: Duplicate Code (jscpd)
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm run jscpd
+
+ tech-debt:
+ name: Tech Debt Scan
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm run scan:todos
+
+ test:
+ name: Test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm test
+
+ docs:
+ name: Docs Generation
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ - run: npm ci
+ - run: npm run docs:generate
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 000000000..a9f16727b
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,47 @@
+name: Release
+
+on:
+ push:
+ branches: [main]
+
+permissions:
+ contents: write
+ pull-requests: write
+ id-token: write
+
+jobs:
+ release-please:
+ name: Release Please
+ runs-on: ubuntu-latest
+ outputs:
+ release_created: ${{ steps.release.outputs.release_created }}
+ tag_name: ${{ steps.release.outputs.tag_name }}
+ steps:
+ - uses: googleapis/release-please-action@v4
+ id: release
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ publish:
+ name: Publish to npm
+ needs: release-please
+ if: needs.release-please.outputs.release_created == 'true'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ registry-url: https://registry.npmjs.org
+
+ - run: npm ci
+
+ - name: Verify build
+ run: npm run build
+
+ - name: Publish
+ run: npm publish --provenance --access public
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/release-please-config.json b/release-please-config.json
new file mode 100644
index 000000000..370cc891d
--- /dev/null
+++ b/release-please-config.json
@@ -0,0 +1,20 @@
+{
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
+ "release-type": "node",
+ "include-v-in-tag": false,
+ "changelog-sections": [
+ { "type": "feat", "section": "Features", "hidden": false },
+ { "type": "fix", "section": "Bug Fixes", "hidden": false },
+ { "type": "perf", "section": "Performance Improvements", "hidden": false },
+ { "type": "refactor", "section": "Code Refactoring", "hidden": false },
+ { "type": "docs", "section": "Documentation", "hidden": false },
+ { "type": "test", "section": "Tests", "hidden": false },
+ { "type": "chore", "section": "Chores", "hidden": true },
+ { "type": "ci", "section": "Continuous Integration", "hidden": false }
+ ],
+ "packages": {
+ ".": {
+ "package-name": "@morluto/rea"
+ }
+ }
+}