@rightkit/git 0.2.23 → 0.2.24
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 +0 -0
- package/manifest.mjs +281 -51
- package/manifest.schema.json +17 -2
- package/manifest.test.mjs +108 -1
- package/package.json +6 -5
- package/render.test.mjs +252 -21
- package/sync.test.mjs +3 -0
- package/templates/profiles/rust-hybrid/release-candidate.yml +105 -7
|
@@ -1,18 +1,31 @@
|
|
|
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
|
-
#
|
|
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
|
|
17
|
+
description: Run protected signing, installed qualification, & evidence verification
|
|
11
18
|
required: false
|
|
12
19
|
type: boolean
|
|
13
20
|
default: false
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
publish:
|
|
22
|
+
description: Publish only after same-run signed qualification verifies
|
|
23
|
+
required: false
|
|
24
|
+
type: boolean
|
|
25
|
+
default: false
|
|
26
|
+
concurrency:
|
|
27
|
+
group: release-${{ inputs.version }}
|
|
28
|
+
cancel-in-progress: false
|
|
16
29
|
permissions:
|
|
17
30
|
contents: read
|
|
18
31
|
jobs:
|
|
@@ -22,8 +35,50 @@ jobs:
|
|
|
22
35
|
- name: Refuse private repository
|
|
23
36
|
if: ${{ github.event.repository.private }}
|
|
24
37
|
run: exit 1
|
|
25
|
-
|
|
38
|
+
admission:
|
|
26
39
|
needs: [private-repo-guard]
|
|
40
|
+
runs-on: ubuntu-24.04
|
|
41
|
+
permissions:
|
|
42
|
+
contents: read
|
|
43
|
+
outputs:
|
|
44
|
+
version: ${{ steps.admit.outputs.version }}
|
|
45
|
+
source_revision: ${{ steps.admit.outputs.source_revision }}
|
|
46
|
+
signed_qualification: ${{ steps.admit.outputs.signed_qualification }}
|
|
47
|
+
publish: ${{ steps.admit.outputs.publish }}
|
|
48
|
+
steps:
|
|
49
|
+
- name: Validate immutable dispatch envelope
|
|
50
|
+
shell: bash
|
|
51
|
+
run: |
|
|
52
|
+
set -euo pipefail
|
|
53
|
+
[[ "$GITHUB_REF" == "refs/heads/main" ]]
|
|
54
|
+
[[ "$GITHUB_RUN_ATTEMPT" == "1" ]]
|
|
55
|
+
[[ "${{ inputs.version }}" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
|
|
56
|
+
[[ "${{ inputs.source_revision }}" =~ ^[a-f0-9]{40}$ ]]
|
|
57
|
+
if [[ "${{ inputs.publish }}" == "true" ]]; then [[ "${{ inputs.signed_qualification }}" == "true" ]]; fi
|
|
58
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
59
|
+
with:
|
|
60
|
+
ref: ${{ inputs.source_revision }}
|
|
61
|
+
fetch-depth: 0
|
|
62
|
+
persist-credentials: false
|
|
63
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
64
|
+
with:
|
|
65
|
+
node-version: ${NODE_PUBLISH_VERSION}
|
|
66
|
+
package-manager-cache: false
|
|
67
|
+
${PACKAGE_MANAGER_SETUP}
|
|
68
|
+
- run: ${INSTALL_COMMAND}
|
|
69
|
+
- name: Admit exact main revision & version
|
|
70
|
+
id: admit
|
|
71
|
+
run: ${PM_RUN} ${RELEASE_ADMISSION_SCRIPT}
|
|
72
|
+
env:
|
|
73
|
+
GH_TOKEN: ${{ github.token }}
|
|
74
|
+
RIGHT_GIT_RELEASE_VERSION: ${{ inputs.version }}
|
|
75
|
+
RIGHT_GIT_SOURCE_REVISION: ${{ inputs.source_revision }}
|
|
76
|
+
RIGHT_GIT_SIGNED_QUALIFICATION: ${{ inputs.signed_qualification }}
|
|
77
|
+
RIGHT_GIT_PUBLISH: ${{ inputs.publish }}
|
|
78
|
+
RIGHT_GIT_WORKFLOW_REF: ${{ github.ref }}
|
|
79
|
+
RIGHT_GIT_RUN_ATTEMPT: ${{ github.run_attempt }}
|
|
80
|
+
candidate:
|
|
81
|
+
needs: [admission]
|
|
27
82
|
env:
|
|
28
83
|
SCCACHE_GHA_ENABLED: "true"
|
|
29
84
|
RUSTC_WRAPPER: "sccache"
|
|
@@ -35,7 +90,9 @@ ${CANDIDATE_MATRIX}
|
|
|
35
90
|
steps:
|
|
36
91
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
37
92
|
with:
|
|
93
|
+
ref: ${{ needs.admission.outputs.source_revision }}
|
|
38
94
|
fetch-depth: 0
|
|
95
|
+
persist-credentials: false
|
|
39
96
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
40
97
|
with:
|
|
41
98
|
node-version: ${{ matrix.node }}
|
|
@@ -58,24 +115,65 @@ ${RUST_CACHE_WORKSPACES}
|
|
|
58
115
|
with:
|
|
59
116
|
version: "v0.16.0"
|
|
60
117
|
- run: ${INSTALL_COMMAND}
|
|
118
|
+
- name: Initialize candidate stage summary
|
|
119
|
+
run: ${PM_RUN} ${RELEASE_STAGE_SUMMARY_SCRIPT}
|
|
120
|
+
env:
|
|
121
|
+
RIGHT_GIT_STAGE_ACTION: init
|
|
122
|
+
RIGHT_GIT_STAGE_ROOT: ${{ runner.temp }}/right-git-stage-summary
|
|
123
|
+
RIGHT_GIT_STAGE_EVIDENCE_ROOT: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}
|
|
124
|
+
RIGHT_GIT_STAGE: candidate
|
|
125
|
+
RIGHT_GIT_STAGE_PRODUCER: candidate-${{ matrix.platform }}-${{ matrix.architecture }}
|
|
126
|
+
RIGHT_GIT_RELEASE_VERSION: ${{ needs.admission.outputs.version }}
|
|
127
|
+
RIGHT_GIT_SOURCE_REVISION: ${{ needs.admission.outputs.source_revision }}
|
|
128
|
+
RIGHT_GIT_RELEASE_PLATFORM: ${{ matrix.platform }}
|
|
129
|
+
RIGHT_GIT_RELEASE_ARCHITECTURE: ${{ matrix.architecture }}
|
|
130
|
+
RIGHT_GIT_RUN_ID: ${{ github.run_id }}
|
|
131
|
+
RIGHT_GIT_RUN_ATTEMPT: ${{ github.run_attempt }}
|
|
61
132
|
- name: Build unsigned release candidate
|
|
62
133
|
run: ${PM_RUN} ${CANDIDATE_BUILD_SCRIPT}
|
|
63
134
|
env:
|
|
64
135
|
RIGHT_GIT_ARTIFACT_ROOT: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}
|
|
65
136
|
RIGHT_GIT_RELEASE_PLATFORM: ${{ matrix.platform }}
|
|
66
137
|
RIGHT_GIT_RELEASE_ARCHITECTURE: ${{ matrix.architecture }}
|
|
138
|
+
RIGHT_GIT_SOURCE_REVISION: ${{ needs.admission.outputs.source_revision }}
|
|
67
139
|
- name: Check unsigned release candidate
|
|
68
140
|
run: ${PM_RUN} ${CANDIDATE_CHECK_SCRIPT}
|
|
69
141
|
env:
|
|
70
142
|
RIGHT_GIT_ARTIFACT_ROOT: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}
|
|
71
143
|
RIGHT_GIT_RELEASE_PLATFORM: ${{ matrix.platform }}
|
|
72
144
|
RIGHT_GIT_RELEASE_ARCHITECTURE: ${{ matrix.architecture }}
|
|
145
|
+
RIGHT_GIT_SOURCE_REVISION: ${{ needs.admission.outputs.source_revision }}
|
|
146
|
+
- name: Finalize candidate stage summary
|
|
147
|
+
if: ${{ always() }}
|
|
148
|
+
run: ${PM_RUN} ${RELEASE_STAGE_SUMMARY_SCRIPT}
|
|
149
|
+
env:
|
|
150
|
+
RIGHT_GIT_STAGE_ACTION: finalize
|
|
151
|
+
RIGHT_GIT_STAGE_ROOT: ${{ runner.temp }}/right-git-stage-summary
|
|
152
|
+
RIGHT_GIT_STAGE_EVIDENCE_ROOT: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}
|
|
153
|
+
RIGHT_GIT_STAGE: candidate
|
|
154
|
+
RIGHT_GIT_STAGE_PRODUCER: candidate-${{ matrix.platform }}-${{ matrix.architecture }}
|
|
155
|
+
RIGHT_GIT_STAGE_STATUS: ${{ job.status == 'success' && 'SUCCEEDED' || 'FAILED' }}
|
|
156
|
+
RIGHT_GIT_STAGE_EXIT_CODE: ${{ job.status == 'success' && '0' || '1' }}
|
|
157
|
+
RIGHT_GIT_RELEASE_VERSION: ${{ needs.admission.outputs.version }}
|
|
158
|
+
RIGHT_GIT_SOURCE_REVISION: ${{ needs.admission.outputs.source_revision }}
|
|
159
|
+
RIGHT_GIT_RELEASE_PLATFORM: ${{ matrix.platform }}
|
|
160
|
+
RIGHT_GIT_RELEASE_ARCHITECTURE: ${{ matrix.architecture }}
|
|
161
|
+
RIGHT_GIT_RUN_ID: ${{ github.run_id }}
|
|
162
|
+
RIGHT_GIT_RUN_ATTEMPT: ${{ github.run_attempt }}
|
|
73
163
|
- name: Upload unsigned candidate handoff
|
|
164
|
+
if: ${{ always() }}
|
|
74
165
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
75
166
|
with:
|
|
76
|
-
name: ${ARTIFACT_PREFIX}-
|
|
167
|
+
name: ${ARTIFACT_PREFIX}-${{ github.run_id }}-${{ github.run_attempt }}-candidate-${{ matrix.platform }}-${{ matrix.architecture }}-${{ needs.admission.outputs.version }}-${{ needs.admission.outputs.source_revision }}
|
|
77
168
|
path: ${{ runner.temp }}/${CANDIDATE_ARTIFACT_ROOT}/**
|
|
78
169
|
if-no-files-found: error
|
|
170
|
+
- name: Upload candidate stage summary
|
|
171
|
+
if: ${{ always() }}
|
|
172
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
173
|
+
with:
|
|
174
|
+
name: ${ARTIFACT_PREFIX}-${{ github.run_id }}-${{ github.run_attempt }}-summary-candidate-${{ matrix.platform }}-${{ matrix.architecture }}-${{ needs.admission.outputs.version }}-${{ needs.admission.outputs.source_revision }}
|
|
175
|
+
path: ${{ runner.temp }}/right-git-stage-summary/stage-summary.json
|
|
176
|
+
if-no-files-found: error
|
|
79
177
|
${WINDOWS_SIGNING_JOB}
|
|
80
178
|
${MACOS_SIGNING_JOB}
|
|
81
179
|
${RELEASE_CHAIN_JOBS}
|