Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/deno-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Deno Binaries

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
build-linux:
name: Build (Linux)
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.x

- name: Slim package.json (prod deps only)
run: |
mv package.json package.full.json
deno eval "const p = JSON.parse(await Deno.readTextFile('package.full.json')); const out = { name: p.name, version: p.version, private: true, type: p.type, dependencies: p.dependencies }; await Deno.writeTextFile('package.json', JSON.stringify(out, null, 2) + '\n');"

- name: Compile
run: |
deno task compile:linux-x64
deno task compile:linux-arm64

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: deno-binaries-linux
path: dist-deno/*

build-macos:
name: Build (macOS)
runs-on: macos-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.x

- name: Slim package.json (prod deps only)
run: |
mv package.json package.full.json
deno eval "const p = JSON.parse(await Deno.readTextFile('package.full.json')); const out = { name: p.name, version: p.version, private: true, type: p.type, dependencies: p.dependencies }; await Deno.writeTextFile('package.json', JSON.stringify(out, null, 2) + '\n');"

- name: Compile
run: |
deno task compile:mac-x64
deno task compile:mac-arm64

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: deno-binaries-macos
path: dist-deno/*

upload-release-assets:
name: Upload Release Assets
runs-on: ubuntu-latest
needs: [build-linux, build-macos]
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write

steps:
- name: Download Linux artifacts
uses: actions/download-artifact@v4
with:
name: deno-binaries-linux
path: dist-deno

- name: Download macOS artifacts
uses: actions/download-artifact@v4
with:
name: deno-binaries-macos
path: dist-deno

- name: Generate checksums
run: |
cd dist-deno
sha256sum * > SHA256SUMS.txt
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checksum generation command sha256sum * > SHA256SUMS.txt will include SHA256SUMS.txt in the glob pattern on subsequent runs if the step is re-executed, which could cause issues. Additionally, the SHA256SUMS.txt file itself will be uploaded to the release, and then sha256sum will attempt to hash it along with the binaries. Consider using a more specific pattern like sha256sum c8ctl-* > SHA256SUMS.txt to only hash the actual binaries and exclude the checksum file itself.

Suggested change
sha256sum * > SHA256SUMS.txt
sha256sum c8ctl-* > SHA256SUMS.txt

Copilot uses AI. Check for mistakes.

- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist-deno/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ out
.nuxt
dist

# Deno compiled binaries
dist-deno/

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
Expand Down
6 changes: 6 additions & 0 deletions PLUGIN-HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ When users load plugins, their commands automatically appear in the help text. P
2. **Plugin Section**: If plugins are loaded, a "Plugin Commands" section appears at the bottom of the help text
3. **Command Listing**: Each plugin command is listed with its optional description

## Plugin definition

A plugin needs to have `c8ctl-plugin` in the `keywords` array in its `package.json`. This is a requirement to make the plugin loadable by c8ctl.

See the example plugin in the `demo-plugin` directory for a working example.

## Plugin Structure for Help

Plugins can export an optional `metadata` object alongside the required `commands` object:
Expand Down
16 changes: 16 additions & 0 deletions demo-plugin/c8ctl-plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// c8ctl-plugin.ts
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file comment incorrectly identifies this as a TypeScript file (c8ctl-plugin.ts) when it's actually a JavaScript file (c8ctl-plugin.js). Update the comment to reflect the actual file extension.

Suggested change
// c8ctl-plugin.ts
// c8ctl-plugin.js

Copilot uses AI. Check for mistakes.
export const metadata = {
name: 'my-plugin',
description: 'My custom c8ctl plugin',
commands: {
analyze: {
description: 'Analyze BPMN processes'
}
}
};

export const commands = {
analyze: async (args) => {
console.log('Analyzing...', args);
}
};
13 changes: 13 additions & 0 deletions demo-plugin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "demo-plugin",
"version": "1.0.0",
"description": "Demonstration plugin for c8ctl",
"license": "ISC",
"author": "",
"type": "module",
"main": "c8ctl-plugin.js",
"keywords": ["c8ctl-plugin"],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
}
15 changes: 15 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"lib": ["es2023", "dom"]
},
"tasks": {
"check": "deno check --no-lock src/deno.ts",

"compile:mac-x64": "mkdir -p dist-deno && deno compile --no-lock --no-check --allow-net --allow-env --allow-sys --allow-read --allow-write --allow-run --target x86_64-apple-darwin --output dist-deno/c8ctl-macos-x64 src/deno.ts",
"compile:mac-arm64": "mkdir -p dist-deno && deno compile --no-lock --no-check --allow-net --allow-env --allow-sys --allow-read --allow-write --allow-run --target aarch64-apple-darwin --output dist-deno/c8ctl-macos-arm64 src/deno.ts",
"compile:linux-x64": "mkdir -p dist-deno && deno compile --no-lock --no-check --allow-net --allow-env --allow-sys --allow-read --allow-write --allow-run --target x86_64-unknown-linux-gnu --output dist-deno/c8ctl-linux-x64 src/deno.ts",
"compile:linux-arm64": "mkdir -p dist-deno && deno compile --no-lock --no-check --allow-net --allow-env --allow-sys --allow-read --allow-write --allow-run --target aarch64-unknown-linux-gnu --output dist-deno/c8ctl-linux-arm64 src/deno.ts",

"compile:all": "deno task compile:mac-x64 && deno task compile:mac-arm64 && deno task compile:linux-x64 && deno task compile:linux-arm64"
}
}
Loading