@rightkit/git 0.2.23 → 0.2.25

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,18 +1,36 @@
1
1
  # Managed by right-git — do not hand-edit. Run `right-git sync` to update.
2
2
  # Template: profiles/rust-hybrid/release-candidate.yml | Template version: ${TEMPLATE_VERSION}
3
- # Public CI always produces unsigned candidates. Opt-in finalization signs Windows
4
- # through Azure OIDC & macOS through environment-scoped Apple credentials.
3
+ # Dispatch-only release chain binds every stage to one admitted main revision.
5
4
  name: release-candidate
6
5
  on:
7
6
  workflow_dispatch:
8
7
  inputs:
8
+ version:
9
+ description: Stable SemVer to qualify or publish
10
+ required: true
11
+ type: string
12
+ source_revision:
13
+ description: Exact 40-character lowercase main commit SHA
14
+ required: true
15
+ type: string
9
16
  signed_qualification:
10
- description: Run protected signing & installed qualification without publishing
17
+ description: Run protected signing, installed qualification, & evidence verification
11
18
  required: false
12
19
  type: boolean
13
20
  default: false
14
- push:
15
- tags: ['v*']
21
+ publish:
22
+ description: Publish only after same-run signed qualification verifies
23
+ required: false
24
+ type: boolean
25
+ default: false
26
+ dry_run:
27
+ description: Rehearse packaging, signing & installed qualification from a branch with publication skipped
28
+ required: false
29
+ type: boolean
30
+ default: false
31
+ concurrency:
32
+ group: release-${{ inputs.version }}
33
+ cancel-in-progress: false
16
34
  permissions:
17
35
  contents: read
18
36
  jobs:
@@ -22,8 +40,59 @@ jobs:
22
40
  - name: Refuse private repository
23
41
  if: ${{ github.event.repository.private }}
24
42
  run: exit 1
25
- candidate:
43
+ admission:
26
44
  needs: [private-repo-guard]
45
+ runs-on: ubuntu-24.04
46
+ permissions:
47
+ contents: read
48
+ outputs:
49
+ version: ${{ steps.admit.outputs.version }}
50
+ source_revision: ${{ steps.admit.outputs.source_revision }}
51
+ signed_qualification: ${{ steps.admit.outputs.signed_qualification }}
52
+ publish: ${{ steps.admit.outputs.publish }}
53
+ dry_run: ${{ steps.admit.outputs.dry_run }}
54
+ artifact_suffix: ${{ steps.admit.outputs.artifact_suffix }}
55
+ steps:
56
+ - name: Validate immutable dispatch envelope
57
+ shell: bash
58
+ run: |
59
+ set -euo pipefail
60
+ if [[ "${{ inputs.dry_run }}" == "true" ]]; then
61
+ [[ "$GITHUB_REF" == refs/heads/* ]]
62
+ [[ "${{ inputs.publish }}" != "true" ]]
63
+ else
64
+ [[ "$GITHUB_REF" == "refs/heads/main" ]]
65
+ [[ "$GITHUB_RUN_ATTEMPT" == "1" ]]
66
+ fi
67
+ [[ "${{ inputs.version }}" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
68
+ [[ "${{ inputs.source_revision }}" =~ ^[a-f0-9]{40}$ ]]
69
+ if [[ "${{ inputs.publish }}" == "true" ]]; then [[ "${{ inputs.signed_qualification }}" == "true" ]]; fi
70
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
71
+ with:
72
+ ref: ${{ inputs.source_revision }}
73
+ fetch-depth: 0
74
+ persist-credentials: false
75
+ - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
76
+ with:
77
+ node-version: ${NODE_PUBLISH_VERSION}
78
+ package-manager-cache: false
79
+ ${PACKAGE_MANAGER_SETUP}
80
+ - run: ${INSTALL_COMMAND}
81
+ ${OWNERSHIP_STEP}
82
+ - name: Admit exact main revision & version
83
+ id: admit
84
+ run: ${PM_RUN} ${RELEASE_ADMISSION_SCRIPT}
85
+ env:
86
+ GH_TOKEN: ${{ github.token }}
87
+ RIGHT_GIT_RELEASE_VERSION: ${{ inputs.version }}
88
+ RIGHT_GIT_SOURCE_REVISION: ${{ inputs.source_revision }}
89
+ RIGHT_GIT_SIGNED_QUALIFICATION: ${{ inputs.signed_qualification }}
90
+ RIGHT_GIT_PUBLISH: ${{ inputs.publish }}
91
+ RIGHT_GIT_DRY_RUN: ${{ inputs.dry_run }}
92
+ RIGHT_GIT_WORKFLOW_REF: ${{ github.ref }}
93
+ RIGHT_GIT_RUN_ATTEMPT: ${{ github.run_attempt }}
94
+ candidate:
95
+ needs: [admission]
27
96
  env:
28
97
  SCCACHE_GHA_ENABLED: "true"
29
98
  RUSTC_WRAPPER: "sccache"
@@ -35,7 +104,9 @@ ${CANDIDATE_MATRIX}
35
104
  steps:
36
105
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
37
106
  with:
107
+ ref: ${{ needs.admission.outputs.source_revision }}
38
108
  fetch-depth: 0
109
+ persist-credentials: false
39
110
  - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
40
111
  with:
41
112
  node-version: ${{ matrix.node }}
@@ -58,24 +129,65 @@ ${RUST_CACHE_WORKSPACES}
58
129
  with:
59
130
  version: "v0.16.0"
60
131
  - run: ${INSTALL_COMMAND}
132
+ - name: Initialize candidate stage summary
133
+ run: ${PM_RUN} ${RELEASE_STAGE_SUMMARY_SCRIPT}
134
+ env:
135
+ RIGHT_GIT_STAGE_ACTION: init
136
+ RIGHT_GIT_STAGE_ROOT: ${{ runner.temp }}/right-git-stage-summary
137
+ RIGHT_GIT_STAGE_EVIDENCE_ROOT: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}
138
+ RIGHT_GIT_STAGE: candidate
139
+ RIGHT_GIT_STAGE_PRODUCER: candidate-${{ matrix.platform }}-${{ matrix.architecture }}
140
+ RIGHT_GIT_RELEASE_VERSION: ${{ needs.admission.outputs.version }}
141
+ RIGHT_GIT_SOURCE_REVISION: ${{ needs.admission.outputs.source_revision }}
142
+ RIGHT_GIT_RELEASE_PLATFORM: ${{ matrix.platform }}
143
+ RIGHT_GIT_RELEASE_ARCHITECTURE: ${{ matrix.architecture }}
144
+ RIGHT_GIT_RUN_ID: ${{ github.run_id }}
145
+ RIGHT_GIT_RUN_ATTEMPT: ${{ github.run_attempt }}
61
146
  - name: Build unsigned release candidate
62
147
  run: ${PM_RUN} ${CANDIDATE_BUILD_SCRIPT}
63
148
  env:
64
149
  RIGHT_GIT_ARTIFACT_ROOT: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}
65
150
  RIGHT_GIT_RELEASE_PLATFORM: ${{ matrix.platform }}
66
151
  RIGHT_GIT_RELEASE_ARCHITECTURE: ${{ matrix.architecture }}
152
+ RIGHT_GIT_SOURCE_REVISION: ${{ needs.admission.outputs.source_revision }}
67
153
  - name: Check unsigned release candidate
68
154
  run: ${PM_RUN} ${CANDIDATE_CHECK_SCRIPT}
69
155
  env:
70
156
  RIGHT_GIT_ARTIFACT_ROOT: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}
71
157
  RIGHT_GIT_RELEASE_PLATFORM: ${{ matrix.platform }}
72
158
  RIGHT_GIT_RELEASE_ARCHITECTURE: ${{ matrix.architecture }}
159
+ RIGHT_GIT_SOURCE_REVISION: ${{ needs.admission.outputs.source_revision }}
160
+ - name: Finalize candidate stage summary
161
+ if: ${{ always() }}
162
+ run: ${PM_RUN} ${RELEASE_STAGE_SUMMARY_SCRIPT}
163
+ env:
164
+ RIGHT_GIT_STAGE_ACTION: finalize
165
+ RIGHT_GIT_STAGE_ROOT: ${{ runner.temp }}/right-git-stage-summary
166
+ RIGHT_GIT_STAGE_EVIDENCE_ROOT: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}
167
+ RIGHT_GIT_STAGE: candidate
168
+ RIGHT_GIT_STAGE_PRODUCER: candidate-${{ matrix.platform }}-${{ matrix.architecture }}
169
+ RIGHT_GIT_STAGE_STATUS: ${{ job.status == 'success' && 'SUCCEEDED' || 'FAILED' }}
170
+ RIGHT_GIT_STAGE_EXIT_CODE: ${{ job.status == 'success' && '0' || '1' }}
171
+ RIGHT_GIT_RELEASE_VERSION: ${{ needs.admission.outputs.version }}
172
+ RIGHT_GIT_SOURCE_REVISION: ${{ needs.admission.outputs.source_revision }}
173
+ RIGHT_GIT_RELEASE_PLATFORM: ${{ matrix.platform }}
174
+ RIGHT_GIT_RELEASE_ARCHITECTURE: ${{ matrix.architecture }}
175
+ RIGHT_GIT_RUN_ID: ${{ github.run_id }}
176
+ RIGHT_GIT_RUN_ATTEMPT: ${{ github.run_attempt }}
73
177
  - name: Upload unsigned candidate handoff
178
+ if: ${{ always() }}
74
179
  uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
75
180
  with:
76
- name: ${ARTIFACT_PREFIX}-unsigned-${{ matrix.platform }}-${{ matrix.architecture }}-${{ matrix.node }}
181
+ name: ${ARTIFACT_PREFIX}-${{ github.run_id }}-${{ github.run_attempt }}-candidate-${{ matrix.platform }}-${{ matrix.architecture }}-${{ needs.admission.outputs.version }}-${{ needs.admission.outputs.source_revision }}
77
182
  path: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}/**
78
183
  if-no-files-found: error
184
+ - name: Upload candidate stage summary
185
+ if: ${{ always() }}
186
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
187
+ with:
188
+ name: ${ARTIFACT_PREFIX}-${{ github.run_id }}-${{ github.run_attempt }}-summary-candidate-${{ matrix.platform }}-${{ matrix.architecture }}-${{ needs.admission.outputs.version }}-${{ needs.admission.outputs.source_revision }}
189
+ path: ${{ runner.temp }}/right-git-stage-summary/stage-summary.json
190
+ if-no-files-found: error
79
191
  ${WINDOWS_SIGNING_JOB}
80
192
  ${MACOS_SIGNING_JOB}
81
193
  ${RELEASE_CHAIN_JOBS}
@@ -40,6 +40,7 @@ jobs:
40
40
  package-manager-cache: false
41
41
  ${PACKAGE_MANAGER_SETUP}
42
42
  - run: ${INSTALL_COMMAND}
43
+ ${OWNERSHIP_STEP}
43
44
  - run: node scripts/release/build-candidate.mjs --version "${{ github.event.release.tag_name }}" --platform current --out "release/candidates/publish"
44
45
  - run: node scripts/release/check-release.mjs release/candidates/publish
45
46
  - id: tarball
@@ -79,6 +79,7 @@ jobs:
79
79
  package-manager-cache: false
80
80
  ${PACKAGE_MANAGER_SETUP}
81
81
  - run: ${INSTALL_COMMAND}
82
+ ${OWNERSHIP_STEP}
82
83
  - run: ruby -c release/homebrew/${HOMEBREW_FORMULA_NAME}.rb
83
84
  - name: Checkout Homebrew tap
84
85
  uses: actions/checkout@v5
@@ -29,6 +29,7 @@ jobs:
29
29
  package-manager-cache: false
30
30
  ${PACKAGE_MANAGER_SETUP}
31
31
  - run: ${INSTALL_COMMAND}
32
+ ${OWNERSHIP_STEP}
32
33
  - run: ${PM_RUN} test:all
33
34
  schema:
34
35
  needs: [qualification]
@@ -35,6 +35,7 @@ jobs:
35
35
  package-manager-cache: false
36
36
  ${PACKAGE_MANAGER_SETUP}
37
37
  - run: ${INSTALL_COMMAND}
38
+ ${OWNERSHIP_STEP}
38
39
  - run: node --test tests/release-candidate.test.mjs
39
40
  - run: node scripts/release/build-candidate.mjs --platform current --out "${{ runner.temp }}/${ARTIFACT_PREFIX}-rc"
40
41
  - run: node scripts/release/check-release.mjs "${{ runner.temp }}/${ARTIFACT_PREFIX}-rc"