Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/chocolatey-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish to Chocolatey

on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 0.9.8)'
required: true
type: string

jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Validate release exists
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
$release = gh release view "v${{ inputs.version }}" --json tagName 2>&1
if ($LASTEXITCODE -ne 0) {
Write-Error "Release v${{ inputs.version }} not found"
exit 1
}
Write-Host "Found release v${{ inputs.version }}"

- name: Update version in nuspec
shell: pwsh
run: |
$nuspec = 'packaging/chocolatey/confluence-cli.nuspec'
(Get-Content $nuspec) -replace '<version>0.0.0</version>', "<version>${{ inputs.version }}</version>" | Set-Content $nuspec
Write-Host "Updated nuspec to version ${{ inputs.version }}"

- name: Pack Chocolatey package
shell: pwsh
run: |
cd packaging/chocolatey
choco pack
Get-ChildItem *.nupkg

- name: Push to Chocolatey
shell: pwsh
run: |
cd packaging/chocolatey
choco push (Get-ChildItem *.nupkg).Name --source https://push.chocolatey.org/ --key ${{ secrets.CHOCOLATEY_API_KEY }}
Loading