@pulsehub/runner 0.1.0 → 0.1.2

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.
@@ -13,8 +13,8 @@ jobs:
13
13
  matrix:
14
14
  os: [ubuntu-latest, macos-latest, windows-latest]
15
15
  steps:
16
- - uses: actions/checkout@v4
17
- - uses: actions/setup-node@v4
16
+ - uses: actions/checkout@v7
17
+ - uses: actions/setup-node@v7
18
18
  with:
19
19
  node-version: 20
20
20
  - run: npm test
@@ -1,26 +1,83 @@
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@v7
24
+ with:
25
+ ref: main
26
+ fetch-depth: 0
27
+ - uses: actions/setup-node@v7
28
+ with:
29
+ node-version: 24
30
+ package-manager-cache: false
31
+ - run: npm test
32
+ - run: node src/index.js --help
33
+ - name: Bump patch version and tag the release
34
+ id: bump
35
+ shell: bash
36
+ run: |
37
+ version="$(node -p 'require("./package.json").version')"
38
+ published_version="$(npm view @pulsehub/runner version)"
39
+
40
+ if [ "${version}" = "${published_version}" ]; then
41
+ npm version patch --no-git-tag-version
42
+ version="$(node -p 'require("./package.json").version')"
43
+ tag="v${version}"
44
+
45
+ git config user.name "github-actions[bot]"
46
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
47
+ git add package.json
48
+ git commit -m "chore(release): ${tag} [skip ci]"
49
+ git tag "${tag}"
50
+ git push origin HEAD:main
51
+ git push origin "${tag}"
52
+ else
53
+ tag="v${version}"
54
+ echo "npm latest is ${published_version}; retrying unpublished repository version ${version}."
55
+ if ! git rev-parse --verify "refs/tags/${tag}" >/dev/null 2>&1; then
56
+ git tag "${tag}"
57
+ git push origin "${tag}"
58
+ fi
59
+ fi
60
+
61
+ echo "version=${version}" >> "$GITHUB_OUTPUT"
62
+
11
63
  publish:
64
+ name: Publish to npm
65
+ needs: version
12
66
  runs-on: ubuntu-latest
13
67
  permissions:
14
68
  contents: read
15
69
  id-token: write
16
70
  steps:
17
- - uses: actions/checkout@v4
18
- - uses: actions/setup-node@v4
71
+ - uses: actions/checkout@v7
72
+ with:
73
+ ref: v${{ needs.version.outputs.version }}
74
+ - uses: actions/setup-node@v7
19
75
  with:
20
76
  node-version: 24
21
77
  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
78
+ package-manager-cache: false
79
+ - name: Show Node and npm versions
80
+ run: node --version && npm --version
81
+ - name: Verify version tag
82
+ run: test "v$(node -p 'require("./package.json").version')" = "v${{ needs.version.outputs.version }}"
26
83
  - 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.2",
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
  }