Repository navigation
Nightly: Cua Driver #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Nightly: Cua Driver" | |
| on: | |
| schedule: | |
| - cron: "17 4 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| source_sha: | |
| description: "Exact main SHA (defaults to the workflow revision)" | |
| required: false | |
| type: string | |
| force: | |
| description: "Build even when relevant paths are unchanged" | |
| required: false | |
| default: false | |
| type: boolean | |
| permissions: | |
| contents: write | |
| id-token: write | |
| issues: write | |
| pull-requests: read | |
| concurrency: | |
| group: nightly-cua-driver | |
| cancel-in-progress: false | |
| jobs: | |
| plan: | |
| uses: ./.github/workflows/nightly-component-plan.yml | |
| with: | |
| component: cua-driver-rs | |
| source_sha: ${{ inputs.source_sha || github.sha }} | |
| force: ${{ inputs.force || false }} | |
| build: | |
| needs: plan | |
| if: needs.plan.outputs.should_build == 'true' | |
| uses: ./.github/workflows/cd-rust-cua-driver.yml | |
| with: | |
| version: ${{ needs.plan.outputs.version }} | |
| channel: nightly | |
| source_ref: ${{ inputs.source_sha || github.sha }} | |
| notarize: true | |
| secrets: inherit | |
| publish: | |
| needs: [plan, build] | |
| if: needs.plan.outputs.should_build == 'true' && needs.build.result == 'success' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.source_sha || github.sha }} | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Download verified candidate archives | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: cua-driver-rs-* | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Stage exact nightly assets | |
| run: | | |
| set -euo pipefail | |
| VERSION="${{ needs.plan.outputs.version }}" | |
| mkdir -p release-upload release-metadata release-stage | |
| find artifacts -type f \( -name "*.tar.gz" -o -name "*.zip" \) \ | |
| -exec cp {} release-upload/ \; | |
| cp libs/cua-driver/scripts/install.sh release-upload/install.sh | |
| cp libs/cua-driver/scripts/install.ps1 release-upload/install.ps1 | |
| cp libs/cua-driver/scripts/_install-rust.sh release-upload/_install-rust.sh | |
| cp libs/cua-driver/scripts/uninstall.sh release-upload/uninstall.sh | |
| cp libs/cua-driver/scripts/uninstall.ps1 release-upload/uninstall.ps1 | |
| SKILLS_NAME="cua-driver-rs-v${VERSION}-skills" | |
| python3 .github/scripts/release_channels.py stage-versioned-tree \ | |
| --component cua-driver-rs \ | |
| --version "$VERSION" \ | |
| --source libs/cua-driver/rust/Skills/cua-driver \ | |
| --destination "release-stage/$SKILLS_NAME" | |
| tar -czf "release-upload/${SKILLS_NAME}.tar.gz" \ | |
| -C release-stage "$SKILLS_NAME" | |
| ( | |
| cd release-upload | |
| shasum -a 256 * | sort > checksums.txt | |
| ) | |
| - name: Collect PR-first attribution and render nightly body | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| SOURCE_SHA: ${{ inputs.source_sha || github.sha }} | |
| run: | | |
| set -euo pipefail | |
| python3 .github/scripts/release_channels.py manifest \ | |
| --component cua-driver-rs \ | |
| --version "${{ needs.plan.outputs.version }}" \ | |
| --tag "${{ needs.plan.outputs.tag }}" \ | |
| --source-sha "$SOURCE_SHA" \ | |
| --previous-tag "${{ needs.plan.outputs.attribution_base_tag }}" \ | |
| --asset-dir release-upload \ | |
| --repository "${{ github.repository }}" \ | |
| --output release-metadata/release-manifest.json | |
| python3 .github/scripts/release_channels.py render-nightly \ | |
| --manifest release-metadata/release-manifest.json \ | |
| --body release-metadata/release-body.md | |
| cp release-metadata/release-manifest.json release-upload/ | |
| - name: Preserve nightly evidence | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cua-driver-nightly-metadata-${{ needs.plan.outputs.version }} | |
| path: release-metadata/ | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - name: Publish immutable nightly release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| SOURCE_SHA: ${{ inputs.source_sha || github.sha }} | |
| run: | | |
| python3 .github/scripts/github_release.py \ | |
| --repository "${{ github.repository }}" \ | |
| --tag "${{ needs.plan.outputs.tag }}" \ | |
| --sha "$SOURCE_SHA" \ | |
| --body release-metadata/release-body.md \ | |
| --asset-dir release-upload \ | |
| --channel nightly \ | |
| --create-if-missing \ | |
| --prerelease | |
| - name: Verify release visibility and exact assets | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| SOURCE_SHA: ${{ inputs.source_sha || github.sha }} | |
| run: | | |
| python3 .github/scripts/github_release.py \ | |
| --repository "${{ github.repository }}" \ | |
| --tag "${{ needs.plan.outputs.tag }}" \ | |
| --sha "$SOURCE_SHA" \ | |
| --body release-metadata/release-body.md \ | |
| --asset-dir release-upload \ | |
| --channel nightly \ | |
| --prerelease |