Skip to content

Commit 8807138

Browse files
committed
feat: Add automated chocolatey push on release
1 parent 97d6f1f commit 8807138

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/dotnet-build.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,22 @@ jobs:
120120
fail_on_unmatched_files: true
121121
append_body: true
122122
env:
123-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124+
125+
- name: Install Chocolatey Extensions
126+
run: choco install chocolatey-community-validation.extension -y
127+
shell: powershell
128+
129+
- name: Build Chocolatey Package
130+
run: task build-choco-package
131+
env:
132+
SYNCTRAYZOR_VERSION: ${{ steps.changelog_reader.outputs.version }}
133+
SYNCTRAYZOR_RELEASE_NOTES: ${{ steps.changelog_reader.outputs.changes }}
134+
135+
- name: Push Chocolatey Package
136+
if: steps.changelog_reader.outputs.status != 'prereleased' && steps.changelog_reader.outputs.status != 'unreleased'
137+
run: |
138+
$packagePath = Get-ChildItem "${{ github.workspace }}/release" -Filter "synctrayzor*.nupkg" | Select-Object -ExpandProperty FullName
139+
choco apikey --key ${{ secrets.CHOCO_API_KEY }} --source https://push.chocolatey.org/
140+
choco push $packagePath --source https://push.chocolatey.org/
141+
shell: powershell

0 commit comments

Comments
 (0)