@pulsehub/runner 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,26 +1,67 @@
1
- name: Publish Pulse Runner to npm
1
+ name: Version and publish Pulse Runner
2
2
 
3
3
  on:
4
- release:
5
- types: [published]
4
+ push:
5
+ branches: [main]
6
+
7
+ concurrency:
8
+ group: pulse-runner-release-${{ github.ref }}
9
+ queue: max
6
10
 
7
11
  permissions:
8
12
  contents: read
9
13
 
10
14
  jobs:
15
+ version:
16
+ name: Test and bump patch version
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: write
20
+ outputs:
21
+ version: ${{ steps.bump.outputs.version }}
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ ref: main
26
+ fetch-depth: 0
27
+ - uses: actions/setup-node@v4
28
+ with:
29
+ node-version: 24
30
+ - run: npm test
31
+ - run: node src/index.js --help
32
+ - name: Bump patch version and tag the release
33
+ id: bump
34
+ shell: bash
35
+ run: |
36
+ npm version patch --no-git-tag-version
37
+ version="$(node -p 'require("./package.json").version')"
38
+ tag="v${version}"
39
+
40
+ git config user.name "github-actions[bot]"
41
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
42
+ git add package.json
43
+ git commit -m "chore(release): ${tag} [skip ci]"
44
+ git tag "${tag}"
45
+ git push origin HEAD:main
46
+ git push origin "${tag}"
47
+
48
+ echo "version=${version}" >> "$GITHUB_OUTPUT"
49
+
11
50
  publish:
51
+ name: Publish to npm
52
+ needs: version
12
53
  runs-on: ubuntu-latest
13
54
  permissions:
14
55
  contents: read
15
56
  id-token: write
16
57
  steps:
17
58
  - uses: actions/checkout@v4
59
+ with:
60
+ ref: v${{ needs.version.outputs.version }}
18
61
  - uses: actions/setup-node@v4
19
62
  with:
20
63
  node-version: 24
21
64
  registry-url: https://registry.npmjs.org
22
- - name: Verify release tag matches package version
23
- run: test "v$(node -p 'require("./package.json").version')" = "$GITHUB_REF_NAME"
24
- - run: npm test
25
- - run: node src/index.js --help
65
+ - name: Verify version tag
66
+ run: test "v$(node -p 'require("./package.json").version')" = "v${{ needs.version.outputs.version }}"
26
67
  - run: npm publish --access public
package/README.md CHANGED
@@ -4,7 +4,7 @@ Install with Node 20+: `npm install -g @pulsehub/runner`.
4
4
 
5
5
  To update an existing installation after a new release, run `npm update -g @pulsehub/runner`, then restart the background service with `pulse-runner service stop` followed by `pulse-runner service start`.
6
6
 
7
- Releases are published to npm from GitHub Actions when a GitHub release is published. The release tag (for example, `v0.2.0`) must match the version in `package.json` (`0.2.0`).
7
+ Every push to `main` (including a merged pull request) runs the release workflow. It tests the Runner, increments the patch version, commits the version and a matching `vX.Y.Z` tag to `main`, then publishes that version to npm. The npm publisher uses GitHub Actions OIDC; no npm token is stored in GitHub. Development-channel releases can be added separately when a `dev` branch is introduced.
8
8
 
9
9
  Initialize the local machine with its workspace and agent identifiers plus the release signing public key, then paste the public key printed by `init` into Pulse Settings. The current release key is [`keys/runner-job-v1-public.pem`](keys/runner-job-v1-public.pem). Pulse returns a one-time device credential; `pair` derives and stores the Runner ID and credential with owner-only permissions. Use `diagnose` before `start`.
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulsehub/runner",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Local, credential-safe Pulse Runner",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,7 +10,14 @@
10
10
  "access": "public"
11
11
  },
12
12
  "type": "module",
13
- "bin": { "pulse-runner": "./src/index.js" },
14
- "engines": { "node": ">=20" },
15
- "scripts": { "test": "node --test", "smoke": "node src/index.js --help" }
13
+ "bin": {
14
+ "pulse-runner": "./src/index.js"
15
+ },
16
+ "engines": {
17
+ "node": ">=20"
18
+ },
19
+ "scripts": {
20
+ "test": "node --test",
21
+ "smoke": "node src/index.js --help"
22
+ }
16
23
  }