From 999f9454436abf4ed9c92a5da7d64df061754d6e Mon Sep 17 00:00:00 2001 From: David Date: Thu, 4 Jun 2026 12:50:38 -0700 Subject: [PATCH] ci(publish-bundle): upload Windows bundle installer to OneDrive on release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an rclone OneDrive upload of DisplayXRBundle-*.exe to the release job. publish-bundle.yml is workflow_dispatch-only, so this fires on release only — replacing the per-CI OneDrive uploads removed from displayxr-runtime's build-windows.yml. Destination matches the prior path: "SANDBOX/RUNTIMES + SDK + PLUGINS/OpenXR". Secret mapped to a job-level env (RCLONE_CONFIG_CONTENTS, not the reserved RCLONE_CONFIG) so steps gate on its presence and skip cleanly if unset. Requires the RCLONE_CONFIG secret on this repo (see displayxr-runtime). Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/publish-bundle.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/publish-bundle.yml b/.github/workflows/publish-bundle.yml index df38333..b768b88 100644 --- a/.github/workflows/publish-bundle.yml +++ b/.github/workflows/publish-bundle.yml @@ -95,6 +95,12 @@ jobs: release: needs: [build-macos, build-windows] runs-on: ubuntu-latest + env: + # Mapped to a job-level env so the OneDrive steps can gate on its + # presence (the `secrets` context isn't usable in step `if:`). NOT + # named RCLONE_CONFIG — that's a reserved rclone var pointing at a + # config *file path*, which would break `rclone copy`. + RCLONE_CONFIG_CONTENTS: ${{ secrets.RCLONE_CONFIG }} steps: - uses: actions/checkout@v4 @@ -117,3 +123,31 @@ jobs: _out/DisplayXRBundle-*.pkg _out/DisplayXRBundle-*.exe fail_on_unmatched_files: true + + # Mirror the Windows bundle installer to OneDrive on release. This is + # the single OneDrive upload point for the whole stack — the runtime + # repo no longer pushes per-CI build artifacts there. Gated on the + # RCLONE_CONFIG secret being present (skips cleanly on a fork or if the + # secret is unset) so the release itself never fails on its absence. + - name: Install rclone + if: env.RCLONE_CONFIG_CONTENTS != '' + run: | + curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip + unzip rclone-current-linux-amd64.zip + sudo cp rclone-*-linux-amd64/rclone /usr/local/bin/ + rclone --version + + - name: Setup rclone config + if: env.RCLONE_CONFIG_CONTENTS != '' + run: | + mkdir -p ~/.config/rclone + printf '%s\n' "$RCLONE_CONFIG_CONTENTS" > ~/.config/rclone/rclone.conf + + - name: Upload Windows bundle installer to OneDrive + if: env.RCLONE_CONFIG_CONTENTS != '' + run: | + destPath="SANDBOX/RUNTIMES + SDK + PLUGINS/OpenXR" + installer=$(ls _out/DisplayXRBundle-*.exe | head -n1) + echo "Uploading $(basename "$installer") to OneDrive: $destPath" + rclone copy "$installer" "onedrive:$destPath" --progress + echo "Upload complete!"