mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
* Lowercase release file names; README downloads by channel (#456) Release builds and the GitHub release mirror now name files hex-<version>-macos-arm64.{zip,dmg}, hex-<version>-windows-<arch>.exe and hex-setup-<version>-windows-<arch>.exe (Linux was already lowercase), as @vixalien asked in #456. Already-published files and the frozen 2.3.1 feeds keep their names; the release service's published names (hex, Hex.dmg, Hex.zip, hex.exe, HexSetup.exe) and the bundle (Hex.app) are unchanged, so the updater, installers, Homebrew cask, AUR and Nix are unaffected. The README downloads table has Stable and Dev columns for every target, including the updater files. The site Worker serves /hex/download/dev/<target> (the dev alias) beside /hex/download/<target> (stable, or dev while there is none), and both now cover the bare updater files. * Lowercase names in two remaining examples * Lowercase the Windows executable in the CPU check step
111 lines
4.4 KiB
YAML
111 lines
4.4 KiB
YAML
name: Windows installer
|
|
|
|
# Builds and silently tests hex-setup-<version>-windows-<x64|arm64>.exe
|
|
# around the executables of the stable release on anoma.ly/release, so
|
|
# installer changes are tested on real Windows runners without a full
|
|
# release. Before the first stable release on the service there is nothing to
|
|
# wrap, and the run says so. Release builds and tests the installers for
|
|
# every build itself.
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- packaging/windows/**
|
|
- resources/windows/hex.ico
|
|
- scripts/build-windows-installer.ps1
|
|
- scripts/test-windows-installer.ps1
|
|
- .github/workflows/windows-installer.yml
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: windows-installer-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
published:
|
|
name: Fetch the published release
|
|
runs-on: ubuntu-24.04
|
|
outputs:
|
|
version: ${{ steps.fetch.outputs.version }}
|
|
available: ${{ steps.fetch.outputs.available }}
|
|
steps:
|
|
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
with:
|
|
persist-credentials: false
|
|
- id: fetch
|
|
name: Download the published Windows executables and check them against the manifest
|
|
run: |
|
|
release=https://anoma.ly/release
|
|
manifest="$release/hex/desktop/stable.json"
|
|
if ! curl --fail --silent --show-error --proto '=https' "$manifest" -o manifest.json; then
|
|
echo "::notice::$manifest has no stable Hex release yet; nothing to test."
|
|
echo "available=false" >> "$GITHUB_OUTPUT"
|
|
exit 0
|
|
fi
|
|
echo "available=true" >> "$GITHUB_OUTPUT"
|
|
version=$(jq -er .release.version manifest.json)
|
|
mkdir -p dist
|
|
for label in x64 arm64; do
|
|
url="${release%/release}$(jq -er --arg t "windows-$label" '.release.targets[$t].url' manifest.json)"
|
|
file="dist/hex-$version-windows-$label.exe"
|
|
curl --fail --silent --show-error --proto '=https' "$url" -o "$file"
|
|
test "$(sha256sum < "$file" | cut -d' ' -f1)" = "$(jq -r --arg t "windows-$label" '.release.targets[$t].sha256' manifest.json)"
|
|
done
|
|
echo "Testing installers around Hex $version from $manifest." >> "$GITHUB_STEP_SUMMARY"
|
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
if: steps.fetch.outputs.available == 'true'
|
|
with:
|
|
name: published
|
|
path: dist/
|
|
if-no-files-found: error
|
|
|
|
installer:
|
|
name: Installer ${{ matrix.arch }}
|
|
needs: published
|
|
if: needs.published.outputs.available == 'true'
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: x86_64
|
|
label: x64
|
|
runner: windows-latest
|
|
- arch: aarch64
|
|
label: arm64
|
|
runner: windows-11-arm
|
|
env:
|
|
HEX_VERSION: ${{ needs.published.outputs.version }}
|
|
steps:
|
|
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
|
with:
|
|
name: published
|
|
path: published
|
|
- name: Build the installer
|
|
shell: pwsh
|
|
run: |
|
|
$exe = (Resolve-Path "published/hex-$env:HEX_VERSION-windows-${{ matrix.label }}.exe").Path
|
|
"HEX_EXE=$exe" | Out-File -FilePath $env:GITHUB_ENV -Append
|
|
scripts/build-windows-installer.ps1 -Executable $exe -Version $env:HEX_VERSION -Arch ${{ matrix.arch }} -OutDir installers
|
|
- name: Install, reinstall, install over another version, and uninstall silently
|
|
shell: pwsh
|
|
run: scripts/test-windows-installer.ps1 -Installer "installers/hex-setup-$env:HEX_VERSION-windows-${{ matrix.label }}.exe" -Executable $env:HEX_EXE -Version $env:HEX_VERSION
|
|
- name: Upload installer logs
|
|
if: always()
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
with:
|
|
name: installer-logs-${{ matrix.label }}
|
|
path: ${{ runner.temp }}/hex-installer-logs
|
|
if-no-files-found: ignore
|
|
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
with:
|
|
name: hex-setup-${{ matrix.label }}
|
|
path: installers/
|
|
if-no-files-found: error
|