@rightkit/git 0.2.14 → 0.2.16

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.
package/cli/right-git.mjs CHANGED
File without changes
package/manifest.mjs CHANGED
@@ -442,7 +442,7 @@ function windowsSigningJob(manifest, pm, artifactPrefix) {
442
442
  return `
443
443
  windows-sign:
444
444
  needs: [candidate]
445
- if: \${{ startsWith(github.ref, 'refs/tags/v') }}
445
+ if: \${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && inputs.signed_qualification == true) }}
446
446
  environment: release
447
447
  strategy:
448
448
  fail-fast: false
@@ -532,7 +532,7 @@ function macosSigningJob(manifest, pm, artifactPrefix) {
532
532
  return `
533
533
  macos-sign:
534
534
  needs: [candidate]
535
- if: \${{ startsWith(github.ref, 'refs/tags/v') }}
535
+ if: \${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && inputs.signed_qualification == true) }}
536
536
  environment: release
537
537
  strategy:
538
538
  fail-fast: false
@@ -630,7 +630,7 @@ function releaseChainJobs(manifest, pm, artifactPrefix) {
630
630
  return `
631
631
  installed-qualification:
632
632
  needs: [candidate, windows-sign]
633
- if: \${{ always() && startsWith(github.ref, 'refs/tags/v') && needs.candidate.result == 'success' }}
633
+ if: \${{ always() && (startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && inputs.signed_qualification == true)) && needs.candidate.result == 'success' }}
634
634
  environment: release
635
635
  runs-on: \${{ vars.${chain.qualificationRunnerVariable} || '${windowsRunner}' }}
636
636
  steps:
@@ -657,6 +657,7 @@ ${pm.setup}
657
657
  - name: Run installed-artifact qualification
658
658
  run: ${pm.runPrefix} ${chain.installedQualificationScript}
659
659
  env:
660
+ GH_TOKEN: \${{ github.token }}
660
661
  RIGHT_GIT_FINALIZED_WINDOWS_ROOT: \${{ runner.temp }}/right-git-release/windows
661
662
  RIGHT_GIT_QUALIFICATION_EVIDENCE_ROOT: \${{ runner.temp }}/right-git-release/qualification
662
663
  RIGHT_GIT_SOURCE_REVISION: \${{ env.RIGHT_GIT_SOURCE_REVISION }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/git",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "Public-repo-only GitHub Actions workflow layer: templates, visibility gate, sync/drift/adopt/uninstall for right-git.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -15,9 +15,6 @@
15
15
  "*.json"
16
16
  ],
17
17
  "sideEffects": false,
18
- "scripts": {
19
- "test": "node --test *.test.mjs"
20
- },
21
18
  "publishConfig": {
22
19
  "registry": "https://registry.npmjs.org/",
23
20
  "access": "public"
@@ -27,5 +24,7 @@
27
24
  "url": "git+https://github.com/bogusyogi/claude.git",
28
25
  "directory": "tools/rightkit/packages/git"
29
26
  },
30
- "packageManager": "pnpm@11.24.0"
31
- }
27
+ "scripts": {
28
+ "test": "node --test *.test.mjs"
29
+ }
30
+ }
package/render.test.mjs CHANGED
@@ -93,7 +93,7 @@ test("rust-hybrid release candidate can opt into OIDC Windows signing without lo
93
93
  buildRenderContext(manifest, "/repos/widgets"),
94
94
  );
95
95
  assert.match(content, /environment: release/);
96
- assert.match(content, /windows-sign:\n needs: \[candidate\]\n if: \$\{\{ startsWith\(github\.ref, 'refs\/tags\/v'\) \}\}/);
96
+ assert.match(content, /windows-sign:\n needs: \[candidate\]\n if: \$\{\{ startsWith\(github\.ref, 'refs\/tags\/v'\) \|\| \(github\.event_name == 'workflow_dispatch' && inputs\.signed_qualification == true\) \}\}/);
97
97
  assert.match(content, /id-token: write/);
98
98
  assert.match(content, /azure\/login@[a-f0-9]{40}/);
99
99
  assert.match(content, /vars\.AZURE_CLIENT_ID/);
@@ -120,7 +120,7 @@ test("rust-hybrid release candidate can opt into protected macOS signing & notar
120
120
  buildRenderContext(manifest, "/repos/widgets"),
121
121
  );
122
122
  assert.match(content, /macos-sign:/);
123
- assert.match(content, /macos-sign:\n needs: \[candidate\]\n if: \$\{\{ startsWith\(github\.ref, 'refs\/tags\/v'\) \}\}/);
123
+ assert.match(content, /macos-sign:\n needs: \[candidate\]\n if: \$\{\{ startsWith\(github\.ref, 'refs\/tags\/v'\) \|\| \(github\.event_name == 'workflow_dispatch' && inputs\.signed_qualification == true\) \}\}/);
124
124
  assert.match(content, /environment: release/);
125
125
  assert.match(content, /secrets\.APPLE_CERTIFICATE_BASE64/);
126
126
  assert.match(content, /temporary keychain/i);
@@ -205,12 +205,19 @@ test("rust-hybrid release chain preserves signed candidate, installed qualificat
205
205
  );
206
206
  assert.match(content, /windows-sign:[\s\S]*pnpm run release:finalize:win/);
207
207
  assert.match(content, /macos-sign:[\s\S]*pnpm run release:finalize:mac/);
208
+ assert.match(content, /signed_qualification:\n description: Run protected signing & installed qualification without publishing/);
209
+ assert.match(content, /windows-sign:[\s\S]*inputs\.signed_qualification == true/);
210
+ assert.match(content, /macos-sign:[\s\S]*inputs\.signed_qualification == true/);
208
211
  assert.match(content, /installed-qualification:\n needs: \[candidate, windows-sign\]/);
212
+ assert.match(content, /installed-qualification:[\s\S]*inputs\.signed_qualification == true/);
209
213
  assert.match(content, /installed_qualification_failed/);
210
214
  assert.match(content, /shell: pwsh\n run: \|\n throw 'installed_qualification_failed \{ reason: prerequisites_absent, detail: "same-run Windows signing\/finalization did not succeed" \}'/);
211
215
  assert.doesNotMatch(content, /^ run: throw 'installed_qualification_failed .*detail: /m);
212
216
  assert.match(content, /pnpm run release:qualify:installed/);
217
+ assert.match(content, /installed-qualification:[\s\S]*GH_TOKEN: \$\{\{ github\.token \}\}/);
213
218
  assert.match(content, /publish:\n needs: \[installed-qualification, macos-sign\]/);
219
+ assert.match(content, /publish:[\s\S]*startsWith\(github\.ref, 'refs\/tags\/v'\)/);
220
+ assert.doesNotMatch(content.slice(content.indexOf(" publish:")), /inputs\.signed_qualification/);
214
221
  assert.match(content, /needs\.macos-sign\.result == 'success'/);
215
222
  assert.match(content, /contents: write/);
216
223
  assert.match(content, /pnpm run release:publish:qualified/);
@@ -5,6 +5,12 @@
5
5
  name: release-candidate
6
6
  on:
7
7
  workflow_dispatch:
8
+ inputs:
9
+ signed_qualification:
10
+ description: Run protected signing & installed qualification without publishing
11
+ required: false
12
+ type: boolean
13
+ default: false
8
14
  push:
9
15
  tags: ['v*']
10
16
  permissions: