|
1 | | -name: Windows backport validation |
| 1 | +name: Windows signing candidates |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: [shailendra-nv/windows-security-handoff] |
6 | | - paths: ['.github/workflows/windows-packages.yml'] |
| 6 | + paths: ['.github/workflows/windows-packages.yml', 'packaging/windows/**'] |
7 | 7 | workflow_dispatch: |
8 | 8 |
|
9 | 9 | permissions: |
10 | 10 | contents: read |
11 | 11 |
|
12 | 12 | env: |
13 | | - SOURCE_SHA: 76873620f6630c85f4eeb927e52426fc1823bebb |
| 13 | + SOURCE_SHA: e39791be4f47ed6fb6357885ef42ca1339320679 |
14 | 14 | SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENSHELL: 0.1.8 |
15 | 15 |
|
16 | 16 | jobs: |
|
55 | 55 | rustup set profile minimal |
56 | 56 | rustup toolchain install |
57 | 57 | if ($LASTEXITCODE -ne 0) { throw 'Rust installation failed' } |
| 58 | + $toolchain = ((rustup show active-toolchain) -split ' ')[0] |
| 59 | + if ($LASTEXITCODE -ne 0 -or -not $toolchain) { throw 'Rust toolchain discovery failed' } |
| 60 | + "RUSTUP_TOOLCHAIN=$toolchain" >> $env:GITHUB_ENV |
58 | 61 | - name: Install cargo-nextest |
59 | 62 | run: mise install --locked github:nextest-rs/nextest |
60 | 63 | - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 |
|
83 | 86 | retention-days: 30 |
84 | 87 |
|
85 | 88 | sdk: |
86 | | - name: Validate matching SDKs |
| 89 | + name: Build matching SDKs |
87 | 90 | runs-on: ubuntu-latest |
88 | 91 | timeout-minutes: 30 |
89 | 92 | steps: |
|
95 | 98 | with: |
96 | 99 | install: false |
97 | 100 | experimental: true |
98 | | - - name: Run SDK regression checks |
| 101 | + - name: Build SDKs using repository tasks |
99 | 102 | run: | |
100 | 103 | mise install --locked python uv node |
| 104 | + mise run --skip-tools build:python:wheel |
101 | 105 | mise run --skip-tools sdk:ts:ci |
102 | 106 | mise run --skip-tools test:python |
| 107 | + mkdir sdk-artifacts |
| 108 | + cp target/wheels/openshell-0.1.8-py3-none-any.whl sdk-artifacts/ |
| 109 | + cd sdk/typescript |
| 110 | + npm version 0.1.8 --no-git-tag-version --ignore-scripts |
| 111 | + npm pack --ignore-scripts --pack-destination ../../sdk-artifacts |
| 112 | + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 |
| 113 | + with: |
| 114 | + name: sdk |
| 115 | + path: sdk-artifacts/ |
| 116 | + if-no-files-found: error |
| 117 | + retention-days: 30 |
| 118 | + |
| 119 | + package: |
| 120 | + name: Package and attest |
| 121 | + needs: [native, sdk] |
| 122 | + runs-on: ubuntu-latest |
| 123 | + timeout-minutes: 20 |
| 124 | + permissions: |
| 125 | + contents: read |
| 126 | + id-token: write |
| 127 | + attestations: write |
| 128 | + artifact-metadata: write |
| 129 | + steps: |
| 130 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 131 | + with: |
| 132 | + path: automation |
| 133 | + persist-credentials: false |
| 134 | + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 135 | + with: |
| 136 | + ref: ${{ env.SOURCE_SHA }} |
| 137 | + path: source |
| 138 | + persist-credentials: false |
| 139 | + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| 140 | + with: |
| 141 | + path: inputs |
| 142 | + - uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0 |
| 143 | + with: |
| 144 | + install: false |
| 145 | + - name: Assemble and audit packages |
| 146 | + run: | |
| 147 | + cd source |
| 148 | + mise install --locked uv python github:anchore/syft |
| 149 | + mise exec uv python github:anchore/syft -- mise run --skip-tools sbom |
| 150 | + mise exec uv python -- uv run --no-project python ../automation/packaging/windows/package.py |
| 151 | + - name: Attest candidate ZIP provenance |
| 152 | + id: attest |
| 153 | + uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2 |
| 154 | + with: |
| 155 | + subject-path: dist/*.zip |
| 156 | + push-to-registry: false |
| 157 | + create-storage-record: false |
| 158 | + - name: Save verification bundle |
| 159 | + run: cp "$BUNDLE_PATH" dist/github-attestation.sigstore.json |
| 160 | + env: |
| 161 | + BUNDLE_PATH: ${{ steps.attest.outputs.bundle-path }} |
| 162 | + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 |
| 163 | + with: |
| 164 | + name: OpenShell-Windows-0.1.8-signing-candidates |
| 165 | + path: dist/ |
| 166 | + if-no-files-found: error |
| 167 | + retention-days: 30 |
0 commit comments