diff --git a/.github/workflows/bootstrap-winget.yml b/.github/workflows/bootstrap-winget.yml new file mode 100644 index 0000000..bac7b91 --- /dev/null +++ b/.github/workflows/bootstrap-winget.yml @@ -0,0 +1,96 @@ +name: Bootstrap WinGet package + +"on": + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: "winget-bootstrap" + cancel-in-progress: false + +jobs: + submit-initial-manifest: + name: Submit initial WinGet manifest + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Validate WinGet token + shell: pwsh + env: + WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }} + run: | + $ErrorActionPreference = "Stop" + if ([string]::IsNullOrWhiteSpace($env:WINGET_TOKEN)) { + throw "Missing required repository secret: WINGET_TOKEN" + } + + - name: Check package is not already bootstrapped + shell: pwsh + run: | + $ErrorActionPreference = "Stop" + $packageId = "Wildfoundry.DataplicityCLI" + $manifestUrl = "https://github.com/microsoft/winget-pkgs/tree/master/manifests/$($packageId.ToLower()[0])/$($packageId.Replace('.', '/'))" + + try { + Invoke-WebRequest -Uri $manifestUrl -Method Head -UseBasicParsing | Out-Null + throw "Package $packageId already exists in winget-pkgs. Use update-winget.yml for future releases." + } catch { + if ($_.Exception.Message -like "Package $packageId already exists*") { + throw + } + Write-Host "Package $packageId is not present yet; continuing with bootstrap submission." + } + + - name: Check WinGet token owner and fork access + shell: pwsh + env: + WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }} + run: | + $ErrorActionPreference = "Stop" + $headers = @{ + Authorization = "Bearer $env:WINGET_TOKEN" + Accept = "application/vnd.github+json" + "X-GitHub-Api-Version" = "2022-11-28" + } + + $user = Invoke-RestMethod -Headers $headers -Uri "https://api.github.com/user" + Write-Host "WINGET_TOKEN owner: $($user.login)" + + $fork = Invoke-RestMethod -Headers $headers -Uri "https://api.github.com/repos/wildfoundry/winget-pkgs" + if (-not $fork.fork -or $fork.parent.full_name -ne "microsoft/winget-pkgs") { + throw "wildfoundry/winget-pkgs is not a fork of microsoft/winget-pkgs." + } + Write-Host "Found fork: $($fork.full_name), parent: $($fork.parent.full_name)" + + if ($fork.permissions) { + Write-Host "Token permissions on wildfoundry/winget-pkgs: admin=$($fork.permissions.admin), push=$($fork.permissions.push), maintain=$($fork.permissions.maintain)" + if (-not ($fork.permissions.push -or $fork.permissions.admin -or $fork.permissions.maintain)) { + throw "WINGET_TOKEN owner cannot push to wildfoundry/winget-pkgs." + } + } else { + Write-Host "GitHub API did not return repository permissions for this token." + } + + - name: Download WinGetCreate + shell: pwsh + run: | + $ErrorActionPreference = "Stop" + Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe -UseBasicParsing + + - name: Submit initial manifest + shell: pwsh + env: + WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }} + run: | + $ErrorActionPreference = "Stop" + $manifestPath = "build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6" + $prTitle = "New package: Wildfoundry.DataplicityCLI version 0.1.6" + + ./wingetcreate.exe submit ` + --token $env:WINGET_TOKEN ` + --prtitle $prTitle ` + --no-open ` + $manifestPath diff --git a/build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6/Wildfoundry.DataplicityCLI.installer.yaml b/build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6/Wildfoundry.DataplicityCLI.installer.yaml new file mode 100644 index 0000000..3fc0859 --- /dev/null +++ b/build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6/Wildfoundry.DataplicityCLI.installer.yaml @@ -0,0 +1,27 @@ +# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.9.0.schema.json + +PackageIdentifier: Wildfoundry.DataplicityCLI +PackageVersion: 0.1.6 +Platform: +- Windows.Desktop +InstallerType: wix +Scope: machine +InstallModes: +- interactive +- silent +- silentWithProgress +UpgradeBehavior: install +Commands: +- dataplicity +ElevationRequirement: elevatesSelf +Installers: +- Architecture: x64 + InstallerUrl: https://github.com/wildfoundry/dataplicity-cli/releases/download/v0.1.6/dataplicity-cli-0.1.6-windows-x64.msi + InstallerSha256: 399CB0A4415F01AC22252F3F533199ACFF2287EFBC8E7C197C65F0A54EF0365B + AppsAndFeaturesEntries: + - DisplayName: Dataplicity CLI + Publisher: Dataplicity + UpgradeCode: '{B3C5A6C2-3D42-4E6B-9E2E-4F7B3D3C2A10}' +ManifestType: installer +ManifestVersion: 1.9.0 +ReleaseDate: 2026-07-13 diff --git a/build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6/Wildfoundry.DataplicityCLI.locale.en-US.yaml b/build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6/Wildfoundry.DataplicityCLI.locale.en-US.yaml new file mode 100644 index 0000000..8cd97d4 --- /dev/null +++ b/build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6/Wildfoundry.DataplicityCLI.locale.en-US.yaml @@ -0,0 +1,30 @@ +# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.9.0.schema.json + +PackageIdentifier: Wildfoundry.DataplicityCLI +PackageVersion: 0.1.6 +PackageLocale: en-US +Publisher: Dataplicity +PublisherUrl: https://github.com/wildfoundry +PublisherSupportUrl: https://github.com/wildfoundry/dataplicity-cli/issues +PackageName: Dataplicity CLI +PackageUrl: https://github.com/wildfoundry/dataplicity-cli +License: BSD-3-Clause +LicenseUrl: https://github.com/wildfoundry/dataplicity-cli/blob/v0.1.6/LICENSE +Copyright: Copyright (c) 2026, Wildfoundry Ltd +ShortDescription: Command line interface for Dataplicity OEM and developer workflows. +Description: Dataplicity CLI provides command line access to Dataplicity setup, authentication, organisation, device, terminal, remote command, port forwarding, fleet job, and logging workflows. +Moniker: dataplicity +Tags: +- cli +- command-line +- dataplicity +- developer-tools +- oem +- remote-access +- terminal +ReleaseNotesUrl: https://github.com/wildfoundry/dataplicity-cli/releases/tag/v0.1.6 +Documentations: +- DocumentLabel: Repository + DocumentUrl: https://github.com/wildfoundry/dataplicity-cli +ManifestType: defaultLocale +ManifestVersion: 1.9.0 diff --git a/build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6/Wildfoundry.DataplicityCLI.yaml b/build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6/Wildfoundry.DataplicityCLI.yaml new file mode 100644 index 0000000..8b82d68 --- /dev/null +++ b/build/winget/manifests/w/Wildfoundry/DataplicityCLI/0.1.6/Wildfoundry.DataplicityCLI.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.9.0.schema.json + +PackageIdentifier: Wildfoundry.DataplicityCLI +PackageVersion: 0.1.6 +DefaultLocale: en-US +ManifestType: version +ManifestVersion: 1.9.0