diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index ddb3fe8e4..103feb64e 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -407,6 +407,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Generate download page (index.html) + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | DATE=$(date -u '+%Y-%m-%d %H:%M UTC') SHORT="${{ github.sha }}" @@ -417,191 +419,59 @@ jobs: INSTALLER_URL="https://github.com/$REPO/releases/download/nightly/$EXE_NAME" ZIP_NAME=$(ls downloaded/portable/*.zip | xargs -I{} basename {}) PORTABLE_URL="https://github.com/$REPO/releases/download/nightly/$ZIP_NAME" - # MSI — may not exist if windows-msi.yml has not been run yet MSI_NAME=$(gh release view nightly --json assets --jq '.assets[].name' 2>/dev/null \ | grep '\.msi$' | head -1 || echo "") if [ -n "$MSI_NAME" ]; then MSI_URL="https://github.com/$REPO/releases/download/nightly/$MSI_NAME" - MSI_BLOCK=' - - - Windows Installer - .msi — for enterprise / GPO deployment - - ' else - MSI_BLOCK='' + MSI_URL="" fi - mkdir -p gh-pages - cat > gh-pages/index.html << HTMLEOF - - - - - - QElectroTech – Nightly Builds - - - -
-

⚡ QElectroTech

-

Nightly Windows Builds

-
- -
-
-

Build info

-
- 📅  $DATE
- 🔀  Commit $SHORT
- 🔧  CI Run #${{ github.run_number }} - nightly -
-
- ⚠️ This is a development version; it introduces new features you want, - but may cause bugs that have not yet been identified yet in master. - For production use, download a - stable release. -
-
- -
-

🪟 Windows — x86_64

- -
-
- - - - - HTMLEOF + python3 -c " +import os, sys +date=os.environ['DATE']; short=os.environ['SHORT']; repo=os.environ['REPO'] +run_url=os.environ['RUN_URL']; run_num='${{ github.run_number }}'; sha='${{ github.sha }}' +inst=os.environ['INSTALLER_URL']; port=os.environ['PORTABLE_URL']; msi_url=os.environ.get('MSI_URL','') +msi_block=f'''Windows Installer .msi.msi - for enterprise/GPO deployment''' if msi_url else '' +html=f''' + +QElectroTech - Nightly Builds + +

⚡ QElectroTech

Nightly Windows Builds

+
+

Build info

+
📅  {date}
+🔀  Commit {short}
+🔧  CI Run #{run_num} nightly
+
⚠ This is a development version. For production use, download a stable release.
+

🏹 Windows x86_64

+ +''' +open('gh-pages/index.html','w',encoding='utf-8').write(html) +print('index.html written OK') +" - name: Add .nojekyll to disable Jekyll processing run: touch gh-pages/.nojekyll