Switch remote deploy to vendored source builds

Move remote deployment to a vendored source bundle built on the target host via Docker so redeploys no longer require local cross-compilation or host Go installation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
GitHub Actions
2026-05-08 12:19:18 +08:00
parent bb27566e38
commit c1a0fe2949
1320 changed files with 497125 additions and 11 deletions

View File

@@ -0,0 +1,14 @@
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
$APP_ID = '{{if .AppID}}{{.AppID}}{{else}}Windows App{{end}}'
$template = @"
{{.XML}}
"@
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($template)
$toast = New-Object Windows.UI.Notifications.ToastNotification $xml
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($APP_ID).Show($toast)

View File

@@ -0,0 +1,28 @@
// Package tmpl wraps several templates that are used to generate notifications.
//
// The primary template describes the XML structure that the Windows Runtime expects
// to consume. The powershell template describes a script that we can use to execute
// the notification if the Windows Runtime is unavailable.
//
// For more information about the xml schema:
// https://learn.microsoft.com/en-us/uwp/schemas/tiles/toastschema/schema-root
package tmpl
import (
_ "embed"
"text/template"
)
//go:embed xml.go.tmpl
var xml string
//go:embed powershell.go.tmpl
var powershell string
// XMLTemplate describes the XML content that the Windows Runtime uses to build
// toast notifications.
var XMLTemplate = template.Must(template.New("toast-xml").Parse(xml))
// ScriptTemplate describes the Powershell script that will invoke a toast notification
// given some XML.
var ScriptTemplate = template.Must(template.New("script").Parse(powershell))

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<toast activationType="{{.ActivationType}}" launch="{{.ActivationArguments}}" duration="{{.Duration}}">
<visual>
<binding template="ToastGeneric">
{{if .HeroIcon}}
<image placement="hero" src="{{.HeroIcon}}" />
{{end}}
{{if .Icon}}
<image placement="appLogoOverride" src="{{.Icon}}" {{if .IconCrop}} hint-crop="{{.IconCrop}}" {{end}} />
{{end}}
{{if .Title}}
<text hint-maxLines="1"><![CDATA[{{.Title}}]]></text>
{{end}}
{{if .Body}}
<text><![CDATA[{{.Body}}]]></text>
{{end}}
</binding>
</visual>
{{if ne .Audio "silent"}}
<audio src="{{.Audio}}" loop="{{.Loop}}" />
{{else}}
<audio silent="true" />
{{end}}
{{if .Actions}}
<actions>
{{range .Inputs}}
<input id="{{.ID}}" title="{{.Title}}" placeHolderContent="{{.Placeholder}}" {{if .Selections}} type="selection" {{else}} type="text" {{end}}>
{{range .Selections}}
<selection id="{{.ID}}" content="{{.Content}}" />
{{end}}
</input>
{{end}}
{{range .Actions}}
<action activationType="{{.Type}}" content="{{.Content}}" arguments="{{.Arguments}}" {{if .InputID}} hint-inputId="{{.InputID}}" {{end}} />
{{end}}
</actions>
{{end}}
</toast>