diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 103feb64e..307f210f4 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -409,6 +409,7 @@ jobs: - name: Generate download page (index.html) env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DATE: "placeholder" run: | DATE=$(date -u '+%Y-%m-%d %H:%M UTC') SHORT="${{ github.sha }}" @@ -421,57 +422,13 @@ jobs: PORTABLE_URL="https://github.com/$REPO/releases/download/nightly/$ZIP_NAME" 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" - else - MSI_URL="" - fi - mkdir -p gh-pages - 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') -" + MSI_URL="" + [ -n "$MSI_NAME" ] && MSI_URL="https://github.com/$REPO/releases/download/nightly/$MSI_NAME" + DATE=$(date -u '+%Y-%m-%d %H:%M UTC') + export DATE SHORT REPO SHA="${{ github.sha }}" RUN_URL + export RUN_NUMBER="${{ github.run_number }}" + export INSTALLER_URL PORTABLE_URL MSI_URL + python3 build-aux/generate-page.py - name: Add .nojekyll to disable Jekyll processing run: touch gh-pages/.nojekyll