chore: Trying another pass to fix installer issues #29
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to release, for example 1.0.0" | |
| required: true | |
| release_notes_file: | |
| description: "Path to a markdown file in the repo for release notes" | |
| required: false | |
| default: "packaging/release-notes-template.md" | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| env: | |
| VERSION: ${{ github.event.inputs.version || github.ref_name }} | |
| BUILD_DIR: build-release-windows | |
| ASIO_SDK_DIR: thirdparty/asio | |
| ONNXRUNTIME_VERSION: 1.24.4 | |
| AI_RUNTIME_VERSION: ${{ vars.OPENSTUDIO_AI_RUNTIME_VERSION != '' && vars.OPENSTUDIO_AI_RUNTIME_VERSION || github.event.inputs.version || github.ref_name }} | |
| AI_RUNTIME_STANDALONE_RELEASE_TAG: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG || '20260325' }} | |
| AI_RUNTIME_STANDALONE_PYTHON_VERSION: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION || '3.10.20' }} | |
| AI_RUNTIME_STANDALONE_FLAVOR: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR || 'install_only' }} | |
| RELEASE_SITE_URL: https://openstudio.org.in | |
| DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }} | |
| WINDOWS_CODESIGN_CERT_BASE64: ${{ secrets.WINDOWS_CODESIGN_CERT_BASE64 }} | |
| WINDOWS_CODESIGN_CERT_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_CERT_PASSWORD }} | |
| WINDOWS_CODESIGN_CERT_THUMBPRINT: ${{ secrets.WINDOWS_CODESIGN_CERT_THUMBPRINT }} | |
| WINDOWS_TIMESTAMP_URL: ${{ secrets.WINDOWS_TIMESTAMP_URL }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Doppler CLI | |
| if: env.DOPPLER_TOKEN != '' | |
| uses: dopplerhq/cli-action@v3 | |
| - name: Load release secrets from Doppler | |
| if: env.DOPPLER_TOKEN != '' | |
| shell: pwsh | |
| run: | | |
| $secrets = doppler secrets download --no-file --format json | ConvertFrom-Json -AsHashtable | |
| foreach ($entry in $secrets.GetEnumerator()) { | |
| if (-not [string]::IsNullOrWhiteSpace([Environment]::GetEnvironmentVariable($entry.Key))) { | |
| continue | |
| } | |
| "$($entry.Key)=$($entry.Value)" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| } | |
| - name: Normalize version | |
| shell: pwsh | |
| run: | | |
| $version = "${env:VERSION}" -replace '^v', '' | |
| "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| $aiRuntimeVersion = "${env:AI_RUNTIME_VERSION}" -replace '^v', '' | |
| "AI_RUNTIME_VERSION=$aiRuntimeVersion" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Build frontend | |
| shell: pwsh | |
| run: | | |
| cd frontend | |
| npm ci | |
| npm run build | |
| - name: Prepare Windows AI runtime | |
| shell: pwsh | |
| run: | | |
| $runtimeRoot = Join-Path $env:RUNNER_TEMP "openstudio-ai-runtime-windows-x64" | |
| ./tools/prepare-ai-runtime.ps1 ` | |
| -Platform windows ` | |
| -RuntimeRoot $runtimeRoot ` | |
| -Architecture x64 ` | |
| -RequirementsFile "tools/ai-runtime-requirements.txt" ` | |
| -ExpectedRuntimeVersion $env:AI_RUNTIME_VERSION ` | |
| -StandaloneReleaseTag $env:AI_RUNTIME_STANDALONE_RELEASE_TAG ` | |
| -StandalonePythonVersion $env:AI_RUNTIME_STANDALONE_PYTHON_VERSION ` | |
| -StandaloneFlavor $env:AI_RUNTIME_STANDALONE_FLAVOR | |
| "WINDOWS_AI_RUNTIME_ROOT=$runtimeRoot" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| - name: Install Inno Setup | |
| shell: pwsh | |
| run: choco install innosetup -y --no-progress | |
| - name: Install Windows prerequisite installers | |
| shell: pwsh | |
| run: ./tools/setup-windows-prereqs.ps1 | |
| - name: Install ASIO SDK | |
| shell: pwsh | |
| run: ./tools/setup-asio-sdk.ps1 -Destination $env:ASIO_SDK_DIR | |
| - name: Install optional ONNX Runtime | |
| if: vars.OPENSTUDIO_SETUP_ONNXRUNTIME == 'true' | |
| shell: pwsh | |
| run: ./tools/setup-onnxruntime.ps1 -Version $env:ONNXRUNTIME_VERSION | |
| - name: Configure CMake | |
| shell: pwsh | |
| run: | | |
| cmake -S . -B $env:BUILD_DIR -A x64 ` | |
| "-DOPENSTUDIO_APP_VERSION=$env:VERSION" ` | |
| "-DOPENSTUDIO_UPDATE_MANIFEST_URL_VALUE=$env:RELEASE_SITE_URL/releases/stable/latest.json" ` | |
| "-DOPENSTUDIO_UPDATE_APPCAST_URL_VALUE=$env:RELEASE_SITE_URL/appcast/windows-stable.xml" ` | |
| "-DOPENSTUDIO_RELEASES_PAGE_URL_VALUE=$env:RELEASE_SITE_URL/download" ` | |
| "-DOPENSTUDIO_UPDATE_CHANNEL_VALUE=stable" ` | |
| "-DJUCE_ASIOSDK_PATH=$env:GITHUB_WORKSPACE/$env:ASIO_SDK_DIR" ` | |
| "-DOPENSTUDIO_REQUIRE_ASIO=ON" ` | |
| "-DOPENSTUDIO_ENABLE_EXTERNAL_PYTHON_AI_FALLBACK=OFF" ` | |
| -DFETCHCONTENT_UPDATES_DISCONNECTED=ON | |
| - name: Build OpenStudio | |
| shell: pwsh | |
| run: cmake --build $env:BUILD_DIR --config Release --target OpenStudio | |
| - name: Validate Windows runtime bundle | |
| shell: pwsh | |
| run: ./tools/validate-runtime-bundle.ps1 -Platform windows -BundlePath "$env:BUILD_DIR/OpenStudio_artefacts/Release" -ExpectedVersion $env:VERSION -EnforceLeanBundle | |
| - name: Prepare Windows signing certificate | |
| shell: pwsh | |
| run: | | |
| if ([string]::IsNullOrWhiteSpace($env:WINDOWS_CODESIGN_CERT_BASE64)) { | |
| Write-Host "No Windows code-signing certificate secret was provided." | |
| exit 0 | |
| } | |
| $certPath = Join-Path $env:RUNNER_TEMP "openstudio-codesign.pfx" | |
| [IO.File]::WriteAllBytes($certPath, [Convert]::FromBase64String($env:WINDOWS_CODESIGN_CERT_BASE64)) | |
| "WINDOWS_CODESIGN_CERT_PATH=$certPath" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| - name: Package Windows installer | |
| shell: pwsh | |
| run: | | |
| $arguments = @{ | |
| Version = $env:VERSION | |
| SourceDir = "$env:BUILD_DIR/OpenStudio_artefacts/Release" | |
| } | |
| if (-not [string]::IsNullOrWhiteSpace($env:WINDOWS_CODESIGN_CERT_PATH)) { | |
| $arguments.CertificateFile = $env:WINDOWS_CODESIGN_CERT_PATH | |
| } | |
| if (-not [string]::IsNullOrWhiteSpace($env:WINDOWS_CODESIGN_CERT_PASSWORD)) { | |
| $arguments.CertificatePassword = $env:WINDOWS_CODESIGN_CERT_PASSWORD | |
| } | |
| if (-not [string]::IsNullOrWhiteSpace($env:WINDOWS_CODESIGN_CERT_THUMBPRINT)) { | |
| $arguments.CertificateThumbprint = $env:WINDOWS_CODESIGN_CERT_THUMBPRINT | |
| } | |
| if (-not [string]::IsNullOrWhiteSpace($env:WINDOWS_TIMESTAMP_URL)) { | |
| $arguments.TimestampUrl = $env:WINDOWS_TIMESTAMP_URL | |
| } | |
| ./tools/package-windows-release.ps1 @arguments | |
| - name: Verify Windows release outputs | |
| shell: pwsh | |
| run: | | |
| $requiredFiles = @( | |
| "$env:BUILD_DIR/OpenStudio_artefacts/Release/OpenStudio.exe", | |
| "dist/windows/OpenStudio-Setup-x64.exe" | |
| ) | |
| foreach ($file in $requiredFiles) { | |
| if (-not (Test-Path $file)) { | |
| throw "Required Windows release file missing: $file" | |
| } | |
| } | |
| - name: Package Windows AI runtime | |
| shell: pwsh | |
| run: | | |
| if (-not (Test-Path $env:WINDOWS_AI_RUNTIME_ROOT)) { | |
| throw "Windows AI runtime root was not found at '$env:WINDOWS_AI_RUNTIME_ROOT'." | |
| } | |
| ./tools/package-ai-runtime.ps1 ` | |
| -Platform windows ` | |
| -RuntimeRoot $env:WINDOWS_AI_RUNTIME_ROOT ` | |
| -OutputPath "dist/ai-runtime/OpenStudio-AI-Runtime-windows-x64.zip" ` | |
| -ExpectedRuntimeVersion $env:AI_RUNTIME_VERSION | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-ai-runtime | |
| path: dist/ai-runtime/OpenStudio-AI-Runtime-windows-x64.zip | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-release | |
| path: dist/windows/OpenStudio-Setup-x64.exe | |
| if-no-files-found: error | |
| build-macos: | |
| runs-on: macos-14 | |
| env: | |
| VERSION: ${{ github.event.inputs.version || github.ref_name }} | |
| BUILD_DIR: build-release-macos | |
| AI_RUNTIME_VERSION: ${{ vars.OPENSTUDIO_AI_RUNTIME_VERSION != '' && vars.OPENSTUDIO_AI_RUNTIME_VERSION || github.event.inputs.version || github.ref_name }} | |
| AI_RUNTIME_STANDALONE_RELEASE_TAG: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_RELEASE_TAG || '20260325' }} | |
| AI_RUNTIME_STANDALONE_PYTHON_VERSION: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_PYTHON_VERSION || '3.10.20' }} | |
| AI_RUNTIME_STANDALONE_FLAVOR: ${{ vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR != '' && vars.OPENSTUDIO_AI_RUNTIME_STANDALONE_FLAVOR || 'install_only' }} | |
| RELEASE_SITE_URL: https://openstudio.org.in | |
| DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }} | |
| MACOS_CERTIFICATE_BASE64: ${{ secrets.MACOS_CERTIFICATE_BASE64 }} | |
| MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }} | |
| MACOS_KEYCHAIN_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} | |
| MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Doppler CLI | |
| if: env.DOPPLER_TOKEN != '' | |
| uses: dopplerhq/cli-action@v3 | |
| - name: Load release secrets from Doppler | |
| if: env.DOPPLER_TOKEN != '' | |
| shell: pwsh | |
| run: | | |
| $secrets = doppler secrets download --no-file --format json | ConvertFrom-Json -AsHashtable | |
| foreach ($entry in $secrets.GetEnumerator()) { | |
| if (-not [string]::IsNullOrWhiteSpace([Environment]::GetEnvironmentVariable($entry.Key))) { | |
| continue | |
| } | |
| "$($entry.Key)=$($entry.Value)" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| } | |
| - name: Normalize version | |
| shell: bash | |
| run: | | |
| echo "VERSION=${VERSION#v}" >> "$GITHUB_ENV" | |
| echo "AI_RUNTIME_VERSION=${AI_RUNTIME_VERSION#v}" >> "$GITHUB_ENV" | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Build frontend | |
| shell: bash | |
| run: | | |
| cd frontend | |
| npm ci | |
| npm run build | |
| - name: Prepare macOS AI runtime | |
| shell: pwsh | |
| run: | | |
| $runtimeRoot = Join-Path $env:RUNNER_TEMP "openstudio-ai-runtime-macos-arm64" | |
| ./tools/prepare-ai-runtime.ps1 ` | |
| -Platform macos ` | |
| -RuntimeRoot $runtimeRoot ` | |
| -Architecture arm64 ` | |
| -RequirementsFile "tools/ai-runtime-requirements.txt" ` | |
| -ExpectedRuntimeVersion $env:AI_RUNTIME_VERSION ` | |
| -StandaloneReleaseTag $env:AI_RUNTIME_STANDALONE_RELEASE_TAG ` | |
| -StandalonePythonVersion $env:AI_RUNTIME_STANDALONE_PYTHON_VERSION ` | |
| -StandaloneFlavor $env:AI_RUNTIME_STANDALONE_FLAVOR | |
| "MACOS_AI_RUNTIME_ROOT=$runtimeRoot" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| - name: Prepare macOS signing certificate | |
| if: env.MACOS_CERTIFICATE_BASE64 != '' | |
| shell: bash | |
| run: | | |
| CERT_PATH="$RUNNER_TEMP/openstudio-macos-signing.p12" | |
| KEYCHAIN_PATH="$RUNNER_TEMP/openstudio-signing.keychain-db" | |
| EXISTING_KEYCHAINS="$(security list-keychains -d user | sed 's/^[[:space:]]*//; s/^\"//; s/\"$//')" | |
| echo "$MACOS_CERTIFICATE_BASE64" | base64 --decode > "$CERT_PATH" | |
| security create-keychain -p "$MACOS_KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH" | |
| security unlock-keychain -p "$MACOS_KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| security import "$CERT_PATH" -k "$KEYCHAIN_PATH" -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/xcrun | |
| security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| security list-keychains -d user -s "$KEYCHAIN_PATH" $EXISTING_KEYCHAINS | |
| echo "KEYCHAIN_PATH=$KEYCHAIN_PATH" >> "$GITHUB_ENV" | |
| - name: Configure CMake | |
| shell: bash | |
| run: | | |
| cmake -S . -B "$BUILD_DIR" \ | |
| -DOPENSTUDIO_APP_VERSION="$VERSION" \ | |
| -DOPENSTUDIO_UPDATE_MANIFEST_URL_VALUE="$RELEASE_SITE_URL/releases/stable/latest.json" \ | |
| -DOPENSTUDIO_UPDATE_APPCAST_URL_VALUE="$RELEASE_SITE_URL/appcast/macos-stable.xml" \ | |
| -DOPENSTUDIO_RELEASES_PAGE_URL_VALUE="$RELEASE_SITE_URL/download" \ | |
| -DOPENSTUDIO_UPDATE_CHANNEL_VALUE="stable" \ | |
| -DOPENSTUDIO_ENABLE_EXTERNAL_PYTHON_AI_FALLBACK=OFF \ | |
| -DFETCHCONTENT_UPDATES_DISCONNECTED=ON | |
| - name: Build OpenStudio | |
| shell: bash | |
| run: cmake --build "$BUILD_DIR" --config Release --target OpenStudio | |
| - name: Validate macOS runtime bundle | |
| shell: pwsh | |
| run: | | |
| $appPath = Get-ChildItem -Path $env:BUILD_DIR -Recurse -Directory -Filter OpenStudio.app | Select-Object -First 1 | |
| if (-not $appPath) { | |
| throw "OpenStudio.app was not found in the build output." | |
| } | |
| ./tools/validate-runtime-bundle.ps1 -Platform macos -BundlePath $appPath.FullName -ExpectedVersion $env:VERSION -EnforceLeanBundle | |
| - name: Package macOS DMG | |
| shell: bash | |
| run: | | |
| chmod +x ./tools/package-macos-release.sh | |
| APP_PATH="$(find "$BUILD_DIR" -type d -name 'OpenStudio.app' | head -n 1)" | |
| if [[ -z "$APP_PATH" ]]; then | |
| echo "OpenStudio.app was not found in the build output." >&2 | |
| exit 1 | |
| fi | |
| ./tools/package-macos-release.sh "$APP_PATH" "$VERSION" | |
| - name: Verify macOS release outputs | |
| shell: bash | |
| run: | | |
| test -f "dist/macos/OpenStudio-macOS.dmg" | |
| - name: Package macOS AI runtime | |
| shell: pwsh | |
| run: | | |
| if (-not (Test-Path $env:MACOS_AI_RUNTIME_ROOT)) { | |
| throw "macOS AI runtime root was not found at '$env:MACOS_AI_RUNTIME_ROOT'." | |
| } | |
| ./tools/package-ai-runtime.ps1 ` | |
| -Platform macos ` | |
| -RuntimeRoot $env:MACOS_AI_RUNTIME_ROOT ` | |
| -OutputPath "dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip" ` | |
| -ExpectedRuntimeVersion $env:AI_RUNTIME_VERSION | |
| - name: Clean up macOS signing keychain | |
| if: always() && env.KEYCHAIN_PATH != '' | |
| shell: bash | |
| run: security delete-keychain "$KEYCHAIN_PATH" || true | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-arm64-ai-runtime | |
| path: dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-release | |
| path: dist/macos/OpenStudio-macOS.dmg | |
| if-no-files-found: error | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-windows | |
| - build-macos | |
| permissions: | |
| contents: write | |
| env: | |
| VERSION: ${{ github.event.inputs.version || github.ref_name }} | |
| RELEASE_NOTES_FILE: ${{ github.event.inputs.release_notes_file || 'packaging/release-notes-template.md' }} | |
| DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }} | |
| WEBSITE_REPO: ${{ vars.OPENSTUDIO_WEBSITE_REPO != '' && vars.OPENSTUDIO_WEBSITE_REPO || 'sdevil7th/OpenStudioWebsite' }} | |
| WEBSITE_DISPATCH_EVENT_TYPE: ${{ vars.OPENSTUDIO_WEBSITE_DISPATCH_EVENT_TYPE != '' && vars.OPENSTUDIO_WEBSITE_DISPATCH_EVENT_TYPE || 'openstudio_release_published' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Doppler CLI | |
| if: env.DOPPLER_TOKEN != '' | |
| uses: dopplerhq/cli-action@v3 | |
| - name: Load release secrets from Doppler | |
| if: env.DOPPLER_TOKEN != '' | |
| shell: pwsh | |
| run: | | |
| $secrets = doppler secrets download --no-file --format json | ConvertFrom-Json -AsHashtable | |
| foreach ($entry in $secrets.GetEnumerator()) { | |
| if (-not [string]::IsNullOrWhiteSpace([Environment]::GetEnvironmentVariable($entry.Key))) { | |
| continue | |
| } | |
| "$($entry.Key)=$($entry.Value)" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| } | |
| - name: Normalize version | |
| shell: bash | |
| run: echo "VERSION=${VERSION#v}" >> "$GITHUB_ENV" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-release | |
| path: dist/windows | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-release | |
| path: dist/macos | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-ai-runtime | |
| path: dist/ai-runtime | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-arm64-ai-runtime | |
| path: dist/ai-runtime | |
| - name: Verify downloaded release assets | |
| shell: pwsh | |
| run: | | |
| $requiredFiles = @( | |
| "dist/windows/OpenStudio-Setup-x64.exe", | |
| "dist/macos/OpenStudio-macOS.dmg", | |
| "dist/ai-runtime/OpenStudio-AI-Runtime-windows-x64.zip", | |
| "dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip" | |
| ) | |
| foreach ($file in $requiredFiles) { | |
| if (-not (Test-Path $file)) { | |
| throw "Required downloaded release asset missing: $file" | |
| } | |
| } | |
| - name: Generate checksums and updater metadata | |
| shell: pwsh | |
| run: | | |
| $tag = "${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '' }}" | |
| if ([string]::IsNullOrWhiteSpace($tag)) { $tag = "v$env:VERSION" } | |
| $releaseUrl = "https://github.com/${{ github.repository }}/releases/tag/$tag" | |
| $windowsUrl = "https://github.com/${{ github.repository }}/releases/download/$tag/OpenStudio-Setup-x64.exe" | |
| $macosUrl = "https://github.com/${{ github.repository }}/releases/download/$tag/OpenStudio-macOS.dmg" | |
| $windowsAiRuntimeUrl = "https://github.com/${{ github.repository }}/releases/download/$tag/OpenStudio-AI-Runtime-windows-x64.zip" | |
| $macosArm64AiRuntimeUrl = "https://github.com/${{ github.repository }}/releases/download/$tag/OpenStudio-AI-Runtime-macos-arm64.zip" | |
| ./tools/generate-release-metadata.ps1 ` | |
| -Version $env:VERSION ` | |
| -Channel stable ` | |
| -ReleasePageUrl $releaseUrl ` | |
| -FullReleaseNotesUrl $releaseUrl ` | |
| -NotesFile $env:RELEASE_NOTES_FILE ` | |
| -WindowsAssetPath "dist/windows/OpenStudio-Setup-x64.exe" ` | |
| -WindowsAssetUrl $windowsUrl ` | |
| -WindowsInstallerArguments "/SP- /NOICONS" ` | |
| -MacAssetPath "dist/macos/OpenStudio-macOS.dmg" ` | |
| -MacAssetUrl $macosUrl ` | |
| -WindowsAiRuntimeAssetPath "dist/ai-runtime/OpenStudio-AI-Runtime-windows-x64.zip" ` | |
| -WindowsAiRuntimeAssetUrl $windowsAiRuntimeUrl ` | |
| -MacArm64AiRuntimeAssetPath "dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip" ` | |
| -MacArm64AiRuntimeAssetUrl $macosArm64AiRuntimeUrl ` | |
| -AiRuntimeVersion $env:VERSION | |
| - name: Validate release metadata | |
| shell: pwsh | |
| run: | | |
| ./tools/validate-release-metadata.ps1 ` | |
| -MetadataDir "dist/release-metadata" ` | |
| -Channel stable ` | |
| -WindowsAssetPath "dist/windows/OpenStudio-Setup-x64.exe" ` | |
| -MacAssetPath "dist/macos/OpenStudio-macOS.dmg" ` | |
| -WindowsAiRuntimeAssetPath "dist/ai-runtime/OpenStudio-AI-Runtime-windows-x64.zip" ` | |
| -MacArm64AiRuntimeAssetPath "dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip" | |
| - name: Prepare uniquely named release metadata assets | |
| shell: pwsh | |
| run: | | |
| ./tools/prepare-release-publish-assets.ps1 ` | |
| -MetadataDir "dist/release-metadata" ` | |
| -OutputDir "dist/release-publish-assets" | |
| - name: Publish GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || format('v{0}', github.event.inputs.version) }} | |
| name: OpenStudio ${{ env.VERSION }} | |
| body_path: ${{ env.RELEASE_NOTES_FILE }} | |
| fail_on_unmatched_files: true | |
| overwrite_files: true | |
| files: | | |
| dist/windows/OpenStudio-Setup-x64.exe | |
| dist/macos/OpenStudio-macOS.dmg | |
| dist/ai-runtime/OpenStudio-AI-Runtime-windows-x64.zip | |
| dist/ai-runtime/OpenStudio-AI-Runtime-macos-arm64.zip | |
| dist/release-publish-assets/OpenStudio-checksums.txt | |
| dist/release-publish-assets/OpenStudio-release-latest.json | |
| dist/release-publish-assets/OpenStudio-release-stable-latest.json | |
| dist/release-publish-assets/OpenStudio-ai-runtime-latest.json | |
| dist/release-publish-assets/OpenStudio-ai-runtime-stable-latest.json | |
| dist/release-publish-assets/OpenStudio-appcast-windows-stable.xml | |
| dist/release-publish-assets/OpenStudio-appcast-macos-stable.xml | |
| - name: Verify website dispatch configuration | |
| shell: bash | |
| env: | |
| WEBSITE_DISPATCH_TOKEN: ${{ secrets.OPENSTUDIO_WEBSITE_DISPATCH_TOKEN }} | |
| run: | | |
| if [ -z "$WEBSITE_DISPATCH_TOKEN" ]; then | |
| echo "OPENSTUDIO_WEBSITE_DISPATCH_TOKEN is required so the website repo can publish release metadata." >&2 | |
| exit 1 | |
| fi | |
| - name: Trigger website release publish | |
| uses: peter-evans/repository-dispatch@v3 | |
| with: | |
| token: ${{ secrets.OPENSTUDIO_WEBSITE_DISPATCH_TOKEN }} | |
| repository: ${{ env.WEBSITE_REPO }} | |
| event-type: ${{ env.WEBSITE_DISPATCH_EVENT_TYPE }} | |
| client-payload: >- | |
| {"tag":"${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || format('v{0}', github.event.inputs.version) }}","channel":"stable","desktopRepo":"${{ github.repository }}"} |