@rightkit/git 0.2.6 → 0.2.7

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/manifest.mjs CHANGED
@@ -333,6 +333,9 @@ function windowsSigningJob(manifest, pm, artifactPrefix) {
333
333
  id-token: write
334
334
  steps:
335
335
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
336
+ - name: Resolve checked-out source revision
337
+ shell: pwsh
338
+ run: '"RIGHT_GIT_SOURCE_REVISION=$(git rev-parse HEAD)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append'
336
339
  - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
337
340
  with:
338
341
  node-version: ${nodeVersion}
@@ -373,7 +376,7 @@ ${pm.setup}
373
376
  run: pnpm exec right-release build --platform win --skip-checks
374
377
  env:
375
378
  LEGION_UNSIGNED_CANDIDATE_ROOT: \${{ runner.temp }}/unsigned-windows-candidate
376
- LEGION_SOURCE_REVISION: \${{ github.sha }}
379
+ LEGION_SOURCE_REVISION: \${{ env.RIGHT_GIT_SOURCE_REVISION }}
377
380
  AZURE_ARTIFACT_SIGNING_ENDPOINT: \${{ vars.AZURE_ARTIFACT_SIGNING_ENDPOINT }}
378
381
  AZURE_ARTIFACT_SIGNING_ACCOUNT: \${{ vars.AZURE_ARTIFACT_SIGNING_ACCOUNT }}
379
382
  AZURE_ARTIFACT_SIGNING_PROFILE: \${{ vars.AZURE_ARTIFACT_SIGNING_PROFILE }}
@@ -401,6 +404,9 @@ function macosSigningJob(manifest, pm, artifactPrefix) {
401
404
  contents: read
402
405
  steps:
403
406
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
407
+ - name: Resolve checked-out source revision
408
+ shell: bash
409
+ run: printf 'RIGHT_GIT_SOURCE_REVISION=%s\\n' "$(git rev-parse HEAD)" >> "$GITHUB_ENV"
404
410
  - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
405
411
  with:
406
412
  node-version: ${nodeVersion}
@@ -440,7 +446,7 @@ ${pm.setup}
440
446
  run: pnpm exec right-release build --platform mac --skip-checks
441
447
  env:
442
448
  LEGION_UNSIGNED_CANDIDATE_ROOT: \${{ runner.temp }}/unsigned-macos-candidate
443
- LEGION_SOURCE_REVISION: \${{ github.sha }}
449
+ LEGION_SOURCE_REVISION: \${{ env.RIGHT_GIT_SOURCE_REVISION }}
444
450
  APPLE_DEVELOPER_ID: \${{ vars.APPLE_DEVELOPER_ID }}
445
451
  APPLE_API_KEY: \${{ secrets.APPLE_API_KEY }}
446
452
  APPLE_API_ISSUER: \${{ secrets.APPLE_API_ISSUER }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/git",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
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",
package/render.test.mjs CHANGED
@@ -95,6 +95,9 @@ test("rust-hybrid release candidate can opt into OIDC Windows signing without lo
95
95
  assert.match(content, /vars\.AZURE_CLIENT_ID/);
96
96
  assert.match(content, /right-release build --platform win --skip-checks/);
97
97
  assert.match(content, /Artifact Signing client hash mismatch/);
98
+ assert.match(content, /RIGHT_GIT_SOURCE_REVISION=\$\(git rev-parse HEAD\)/);
99
+ assert.ok(content.includes("LEGION_SOURCE_REVISION: ${{ env.RIGHT_GIT_SOURCE_REVISION }}"));
100
+ assert.doesNotMatch(content, /LEGION_SOURCE_REVISION: \$\{\{ github\.sha \}\}/);
98
101
  assert.doesNotMatch(content, /secrets\.|client-secret|private.key/i);
99
102
  });
100
103
 
@@ -118,6 +121,9 @@ test("rust-hybrid release candidate can opt into protected macOS signing & notar
118
121
  assert.match(content, /temporary keychain/i);
119
122
  assert.match(content, /right-release build --platform mac --skip-checks/);
120
123
  assert.match(content, /secrets\.APPLE_API_KEY_BASE64/);
124
+ assert.match(content, /RIGHT_GIT_SOURCE_REVISION=%s\\n.*git rev-parse HEAD/);
125
+ assert.ok(content.includes("LEGION_SOURCE_REVISION: ${{ env.RIGHT_GIT_SOURCE_REVISION }}"));
126
+ assert.doesNotMatch(content, /LEGION_SOURCE_REVISION: \$\{\{ github\.sha \}\}/);
121
127
  assert.match(content, /security delete-keychain/);
122
128
  assert.doesNotMatch(content, /pull_request_target/);
123
129
  });