Add Gitea runner installer, proxy/SSO support, and release workflow

Scripts:
- Add scripts/Install-GiteaRunner.ps1: cross-platform installer for the
  Gitea act_runner daemon (systemd / launchd / Windows Service).
  - PowerShell 7+ runtime guard (works under irm | iex).
  - Explicit env var resolution (Process -> User -> Machine) for
    InstanceUrl and RegistrationToken with named candidates.
  - UTF-8 (no BOM) for every file write via [System.IO.File] APIs.
  - System proxy + DefaultNetworkCredentials on all web calls.
  - Optional -Labels; ServiceName/ServiceDisplayName split prevents
    systemd 'Invalid unit name' errors caused by whitespace.
  - config.yaml is always generated before the registration skip-check
    so upgrades produce a config the daemon can load.

Module:
- InfisicalHttpClient: enable UseDefaultCredentials and attach the
  system proxy with DefaultNetworkCredentials so requests work behind
  authenticated corporate proxies / SSO.
- ExportInfisicalSecretsCmdlet: make the UTF-8 (no BOM) case explicit
  in the encoding resolver.

CI/CD (.gitea/workflows/publish-psgallery.yml):
- Split into build -> release -> publish with hard `needs:` ordering
  so publish never runs unless build and release both succeed.
- Build job uploads Module/PSInfisicalAPI as an artifact.
- Release job downloads the artifact, reads the version from the
  manifest, zips the module, and creates a Gitea release tagged with
  the bare version. Release notes include version, full + short commit
  SHA, build timestamp, merged PR info, workflow run link, and any
  matching CHANGELOG.md section. Skips cleanly when the tag already
  exists.
- Publish job re-validates the downloaded manifest and runs
  Publish-Module against PSGallery using PSGALLERY_API_KEY.
This commit is contained in:
GraceSolutions
2026-06-02 15:48:54 -04:00
parent fa65c18bc1
commit eaffeedf12
7 changed files with 1332 additions and 15 deletions
@@ -89,6 +89,7 @@ namespace PSInfisicalAPI.Cmdlets
{
switch (encoding)
{
case InfisicalExportEncoding.UTF8: return new UTF8Encoding(false);
case InfisicalExportEncoding.UTF8Bom: return new UTF8Encoding(true);
case InfisicalExportEncoding.Unicode: return new UnicodeEncoding();
default: return new UTF8Encoding(false);
@@ -42,6 +42,14 @@ namespace PSInfisicalAPI.Http
webRequest.UserAgent = "PSInfisicalAPI";
webRequest.Timeout = _timeoutSeconds * 1000;
webRequest.ReadWriteTimeout = _timeoutSeconds * 1000;
webRequest.UseDefaultCredentials = true;
IWebProxy systemProxy = WebRequest.GetSystemWebProxy();
if (systemProxy != null)
{
systemProxy.Credentials = CredentialCache.DefaultNetworkCredentials;
webRequest.Proxy = systemProxy;
}
ApplyHeaders(webRequest, request.Headers);