diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml new file mode 100644 index 0000000..8a42104 --- /dev/null +++ b/.github/workflows/test-winget.yml @@ -0,0 +1,76 @@ +name: Test Winget Manifest + +on: + pull_request: + paths: + - 'packaging/winget/**' + - '.github/workflows/test-winget.yml' + push: + branches: [main] + paths: + - 'packaging/winget/**' + - '.github/workflows/test-winget.yml' + +jobs: + validate-winget: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Validate manifest schema + shell: pwsh + run: | + # Create temp manifests with valid HTTPS URLs for schema validation + # (winget validate requires HTTPS URLs) + $testDir = "winget-validate-test" + New-Item -ItemType Directory -Path $testDir -Force | Out-Null + + Set-Content "$testDir/OpenCLICollective.cfl.yaml" -Encoding UTF8 @( + 'PackageIdentifier: OpenCLICollective.cfl' + 'PackageVersion: 0.0.1' + 'DefaultLocale: en-US' + 'ManifestType: version' + 'ManifestVersion: 1.6.0' + ) + + Set-Content "$testDir/OpenCLICollective.cfl.locale.en-US.yaml" -Encoding UTF8 @( + 'PackageIdentifier: OpenCLICollective.cfl' + 'PackageVersion: 0.0.1' + 'PackageLocale: en-US' + 'Publisher: Open CLI Collective' + 'PublisherUrl: https://github.com/open-cli-collective' + 'PackageName: Confluence CLI' + 'PackageUrl: https://github.com/open-cli-collective/confluence-cli' + 'License: MIT' + 'LicenseUrl: https://github.com/open-cli-collective/confluence-cli/blob/main/LICENSE' + 'ShortDescription: Command-line interface for Atlassian Confluence Cloud' + 'ManifestType: defaultLocale' + 'ManifestVersion: 1.6.0' + ) + + Set-Content "$testDir/OpenCLICollective.cfl.installer.yaml" -Encoding UTF8 @( + 'PackageIdentifier: OpenCLICollective.cfl' + 'PackageVersion: 0.0.1' + 'InstallerType: zip' + 'NestedInstallerType: portable' + 'NestedInstallerFiles:' + ' - RelativeFilePath: cfl.exe' + ' PortableCommandAlias: cfl' + 'Installers:' + ' - Architecture: x64' + ' InstallerUrl: https://github.com/open-cli-collective/confluence-cli/releases/download/v0.0.1/cfl_0.0.1_windows_amd64.zip' + ' InstallerSha256: 0000000000000000000000000000000000000000000000000000000000000001' + ' - Architecture: arm64' + ' InstallerUrl: https://github.com/open-cli-collective/confluence-cli/releases/download/v0.0.1/cfl_0.0.1_windows_arm64.zip' + ' InstallerSha256: 0000000000000000000000000000000000000000000000000000000000000002' + 'ManifestType: installer' + 'ManifestVersion: 1.6.0' + ) + + Write-Host "Validating winget manifest schema..." + winget validate --manifest $testDir/ + if ($LASTEXITCODE -ne 0) { + Write-Error "Manifest schema validation failed" + exit 1 + } + Write-Host "Manifest schema validation passed!" diff --git a/CLAUDE.md b/CLAUDE.md index ae39a8d..9e43a27 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -203,9 +203,15 @@ packaging/ │ ├── tools/chocolateyInstall.ps1 │ ├── tools/chocolateyUninstall.ps1 │ └── README.md # Publishing instructions +├── winget/ # Windows Winget manifests +│ ├── OpenCLICollective.cfl.yaml +│ ├── OpenCLICollective.cfl.installer.yaml +│ ├── OpenCLICollective.cfl.locale.en-US.yaml +│ └── README.md # Publishing instructions └── homebrew/ └── README.md # Points to GoReleaser config ``` - **Homebrew**: Managed by GoReleaser, published to [open-cli-collective/homebrew-tap](https://github.com/open-cli-collective/homebrew-tap) - **Chocolatey**: Manual publish process documented in `packaging/chocolatey/README.md` +- **Winget**: PR submission to [microsoft/winget-pkgs](https://github.com/microsoft/winget-pkgs), documented in `packaging/winget/README.md` diff --git a/packaging/winget/OpenCLICollective.cfl.installer.yaml b/packaging/winget/OpenCLICollective.cfl.installer.yaml new file mode 100644 index 0000000..456c7a8 --- /dev/null +++ b/packaging/winget/OpenCLICollective.cfl.installer.yaml @@ -0,0 +1,18 @@ +# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.6.0.schema.json + +PackageIdentifier: OpenCLICollective.cfl +PackageVersion: 0.0.0 +InstallerType: zip +NestedInstallerType: portable +NestedInstallerFiles: + - RelativeFilePath: cfl.exe + PortableCommandAlias: cfl +Installers: + - Architecture: x64 + InstallerUrl: https://github.com/open-cli-collective/confluence-cli/releases/download/v0.0.0/cfl_0.0.0_windows_amd64.zip + InstallerSha256: 0000000000000000000000000000000000000000000000000000000000000000 + - Architecture: arm64 + InstallerUrl: https://github.com/open-cli-collective/confluence-cli/releases/download/v0.0.0/cfl_0.0.0_windows_arm64.zip + InstallerSha256: 0000000000000000000000000000000000000000000000000000000000000000 +ManifestType: installer +ManifestVersion: 1.6.0 diff --git a/packaging/winget/OpenCLICollective.cfl.locale.en-US.yaml b/packaging/winget/OpenCLICollective.cfl.locale.en-US.yaml new file mode 100644 index 0000000..cc4e912 --- /dev/null +++ b/packaging/winget/OpenCLICollective.cfl.locale.en-US.yaml @@ -0,0 +1,27 @@ +# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.6.0.schema.json + +PackageIdentifier: OpenCLICollective.cfl +PackageVersion: 0.0.0 +PackageLocale: en-US +Publisher: Open CLI Collective +PublisherUrl: https://github.com/open-cli-collective +PackageName: Confluence CLI +PackageUrl: https://github.com/open-cli-collective/confluence-cli +License: MIT +LicenseUrl: https://github.com/open-cli-collective/confluence-cli/blob/main/LICENSE +ShortDescription: Command-line interface for Atlassian Confluence Cloud +Description: |- + A CLI tool for managing Confluence pages with a markdown-first workflow. + Features include page creation, editing, viewing, and deletion with automatic + markdown-to-Confluence conversion. Supports attachments, search via CQL, + and common Confluence macros (TOC, panels, expand). +Tags: + - confluence + - atlassian + - cli + - markdown + - wiki + - documentation +ReleaseNotesUrl: https://github.com/open-cli-collective/confluence-cli/releases +ManifestType: defaultLocale +ManifestVersion: 1.6.0 diff --git a/packaging/winget/OpenCLICollective.cfl.yaml b/packaging/winget/OpenCLICollective.cfl.yaml new file mode 100644 index 0000000..2eac5d3 --- /dev/null +++ b/packaging/winget/OpenCLICollective.cfl.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.6.0.schema.json + +PackageIdentifier: OpenCLICollective.cfl +PackageVersion: 0.0.0 +DefaultLocale: en-US +ManifestType: version +ManifestVersion: 1.6.0 diff --git a/packaging/winget/README.md b/packaging/winget/README.md new file mode 100644 index 0000000..7f11b58 --- /dev/null +++ b/packaging/winget/README.md @@ -0,0 +1,96 @@ +# Winget Package for confluence-cli + +This directory contains the Winget manifest templates for distributing confluence-cli on Windows via `winget install OpenCLICollective.cfl`. + +## Manifest Structure + +``` +packaging/winget/ +├── OpenCLICollective.cfl.yaml # Version manifest +├── OpenCLICollective.cfl.installer.yaml # Installer manifest (URLs, checksums) +├── OpenCLICollective.cfl.locale.en-US.yaml # Locale manifest (descriptions, tags) +└── README.md +``` + +## How Winget Works + +Unlike Chocolatey (which hosts packages on their own feed), Winget manifests live in Microsoft's community repository [microsoft/winget-pkgs](https://github.com/microsoft/winget-pkgs). Publishing requires submitting a PR to that repo. + +## Publishing a New Version + +### Option 1: Manual PR + +1. **Get release info:** + - Download URLs: `https://github.com/open-cli-collective/confluence-cli/releases/download/v/cfl__windows_amd64.zip` + - SHA256 checksums from `checksums.txt` in the release + +2. **Update manifests:** + - Replace `0.0.0` with the actual version in all three YAML files + - Replace placeholder checksums with real SHA256 values + +3. **Validate manifests:** + ```powershell + winget validate --manifest packaging/winget/ + ``` + +4. **Fork and clone** [microsoft/winget-pkgs](https://github.com/microsoft/winget-pkgs) + +5. **Create folder structure:** + ``` + manifests/o/OpenCLICollective/cfl// + ``` + +6. **Copy manifests** into the folder + +7. **Submit PR** to microsoft/winget-pkgs + +### Option 2: Using wingetcreate + +[wingetcreate](https://github.com/microsoft/winget-create) can generate manifests from URLs: + +```powershell +# Install wingetcreate +winget install Microsoft.WingetCreate + +# Create new manifest (interactive) +wingetcreate new https://github.com/open-cli-collective/confluence-cli/releases/download/v/cfl__windows_amd64.zip + +# Or update existing manifest +wingetcreate update OpenCLICollective.cfl --version --urls +``` + +## Manifest Schema + +These manifests use schema version 1.6.0: +- [Version manifest schema](https://aka.ms/winget-manifest.version.1.6.0.schema.json) +- [Installer manifest schema](https://aka.ms/winget-manifest.installer.1.6.0.schema.json) +- [Locale manifest schema](https://aka.ms/winget-manifest.defaultLocale.1.6.0.schema.json) + +## Installer Type + +This package uses: +- `InstallerType: zip` - Our releases are zip archives +- `NestedInstallerType: portable` - Contains a standalone executable +- `PortableCommandAlias: cfl` - Command users type to invoke the tool + +Winget extracts the zip, places `cfl.exe` in a managed location, and creates the command alias. + +## Architecture Support + +| Architecture | Installer URL Pattern | +|--------------|----------------------| +| x64 | `cfl__windows_amd64.zip` | +| arm64 | `cfl__windows_arm64.zip` | + +## After Approval + +Once the PR is merged to microsoft/winget-pkgs, users can install with: +```powershell +winget install OpenCLICollective.cfl +``` + +## References + +- [Winget Manifest Documentation](https://github.com/microsoft/winget-pkgs/tree/master/doc/manifest) +- [Submit packages to Windows Package Manager](https://learn.microsoft.com/en-us/windows/package-manager/package/repository) +- [wingetcreate tool](https://github.com/microsoft/winget-create)