Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit 2ad9958

Browse files
committed
Add workflows
1 parent f815760 commit 2ad9958

4 files changed

Lines changed: 91 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x, 22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: "npm"
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build
29+
run: npm run build
30+
31+
- name: Test
32+
run: npm test

.github/workflows/publish.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*" # Version tags: v1.0.0, v1.0.1, etc.
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "20.x"
24+
registry-url: "https://registry.npmjs.org"
25+
cache: "npm"
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Extract version from tag and update package.json
31+
run: |
32+
# Get the version from the tag (remove 'v' prefix)
33+
TAG_VERSION=${GITHUB_REF#refs/tags/v}
34+
echo "Tag version: $TAG_VERSION"
35+
36+
# Update package.json with the version from the tag
37+
npm version $TAG_VERSION --no-git-tag-version
38+
echo "Version updated in package.json to: $TAG_VERSION"
39+
40+
# Verify the change
41+
cat package.json | grep '"version"'
42+
43+
- name: Build
44+
run: npm run build
45+
46+
- name: Test
47+
run: npm test
48+
49+
- name: Publish
50+
run: npm publish
51+
env:
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "claude-code-sandbox",
2+
"name": "@textcortex/claude-code-sandbox",
33
"version": "0.1.0",
44
"description": "Run Claude Code as an autonomous agent in Docker containers with git integration",
55
"main": "dist/index.js",
@@ -51,6 +51,7 @@
5151
"@types/dockerode": "^3.3.23",
5252
"@types/fs-extra": "^11.0.4",
5353
"@types/inquirer": "^9.0.8",
54+
"@types/jest": "^29.5.12",
5455
"@types/node": "^20.11.5",
5556
"@types/puppeteer": "^5.4.7",
5657
"@types/socket.io-client": "^1.4.36",

test/dummy.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe("Dummy Test", () => {
2+
it("should pass", () => {
3+
expect(true).toBe(true);
4+
});
5+
});

0 commit comments

Comments
 (0)