This GitHub Action automates the process of taking a snapshot and publishing your project using the CodeQuill CLI. It is designed to run in a non-interactive CI environment.
- Installs the CodeQuill CLI automatically.
- Executes codequill snapshot.
- Executes codequill publish with non-interactive flags.
- Waits for the publication transaction to complete.
Before using this action, you must:
- Enable CI integration for your repository in the CodeQuill app to obtain a
CODEQUILL_TOKEN. - Add this token to your GitHub repository secrets (Settings > Secrets and variables > Actions) as
CODEQUILL_TOKEN.
Add the following step to your GitHub Actions workflow:
- name: CodeQuill Snapshot & Publish
uses: ophelios-studio/codequill-action-publish@v1
with:
token: ${{ secrets.CODEQUILL_TOKEN }}
github_id: ${{ github.repository_id }}name: Publish to CodeQuill
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: CodeQuill Snapshot & Publish
uses: ophelios-studio/codequill-action-publish@v1
with:
token: ${{ secrets.CODEQUILL_TOKEN }}
github_id: ${{ github.repository_id }}| Input | Description | Required | Default |
|---|---|---|---|
token |
CodeQuill repo-scoped bearer token. | Yes | |
github_id |
GitHub repository numeric ID. | Yes | github.repository_id |
api_base_url |
Override CodeQuill API base URL. | No | "" |
cli_version |
npm version for codequill CLI. Leave empty for latest. | No | "" |
working_directory |
Working directory where CodeQuill commands run. | No | . |
extra_args |
Extra arguments appended to both commands. | No | "" |
preserve |
Preserve the code after publish. | No | "false" |
- The action installs the specified version (or latest) of the
codequillCLI from npm. - It sets up the necessary environment variables (
CODEQUILL_TOKEN,CODEQUILL_GITHUB_ID). - It runs
codequill snapshotin the specified working directory. - It runs
codequill publish --no-confirm --json --no-wait. - It parses the resulting transaction hash and runs
codequill waitto ensure the process completes successfully on-chain. - If the
preserveoption is enabled, it callscodequill preserve <snapshot_id> --json --no-waitand waits for the preservation transaction to complete.