Skip to content

Make DryRun truly non-executing; set default GitHub repo #3

Make DryRun truly non-executing; set default GitHub repo

Make DryRun truly non-executing; set default GitHub repo #3

name: ESR Watcher + Build (Self-hosted Windows)
on:
schedule:
- cron: '17 9 * * *'
workflow_dispatch:
inputs:
version:
description: 'Optional version override (example: 140.8.0). Leave empty to run check_esr_update.ps1.'
required: false
type: string
publish_draft:
description: 'If true, allow draft release publishing (otherwise force -NoPublish).'
required: false
default: false
type: boolean
jobs:
build:
runs-on: [self-hosted, windows]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Resolve run mode
id: mode
shell: powershell
run: |
$version = "${{ inputs.version }}"
$isManual = "${{ github.event_name }}" -eq "workflow_dispatch"
if ($isManual -and -not [string]::IsNullOrWhiteSpace($version)) {
"run_mode=manual_version" >> $env:GITHUB_OUTPUT
"version=$version" >> $env:GITHUB_OUTPUT
} else {
"run_mode=esr_check" >> $env:GITHUB_OUTPUT
"version=" >> $env:GITHUB_OUTPUT
}
- name: Run check_esr_update.ps1 (default: -NoPublish)

Check failure on line 43 in .github/workflows/esr-self-hosted.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/esr-self-hosted.yml

Invalid workflow file

You have an error in your yaml syntax on line 43
if: steps.mode.outputs.run_mode == 'esr_check'
shell: powershell
env:
GH_TOKEN: ${{ secrets.DUCKSTEPS_GH_TOKEN }}
run: |
$publishDraft = "${{ inputs.publish_draft }}" -eq "true"
$args = @('-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', '.\scripts\check_esr_update.ps1')
if (-not $publishDraft) {
$args += '-NoPublish'
}
powershell @args
- name: Run build_and_release.ps1 (manual version, default: -NoPublish)
if: steps.mode.outputs.run_mode == 'manual_version'
shell: powershell
env:
GH_TOKEN: ${{ secrets.DUCKSTEPS_GH_TOKEN }}
run: |
$publishDraft = "${{ inputs.publish_draft }}" -eq "true"
$version = "${{ steps.mode.outputs.version }}"
$args = @(
'-NoProfile',
'-ExecutionPolicy', 'Bypass',
'-File', '.\scripts\build_and_release.ps1',
'-Version', $version
)
if (-not $publishDraft) {
$args += '-NoPublish'
}
powershell @args
- name: Upload installer artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: ducksteps-installer
if-no-files-found: warn
path: |
D:\ducksteps-obj\esr140\dist\ducksteps-*-Setup.exe
D:\ducksteps-obj\esr140\dist\install\sea\*.installer.exe
- name: Upload standalone artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: ducksteps-standalone
if-no-files-found: warn
path: |
D:\ducksteps-obj\esr140\dist\ducksteps-*-Standalone.7z
D:\ducksteps-obj\esr140\dist\*.win64.zip
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ducksteps-logs
if-no-files-found: warn
path: |
D:\ducksteps-obj\esr140\dist\logs\*.log
D:\ducksteps-obj\esr140\dist\RELEASE_NOTES.md