mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 09:06:41 +02:00
39 lines
944 B
YAML
39 lines
944 B
YAML
name: Deploy Chocolatey Package
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '10.0.x' # Uses latest available 10.0 SDK
|
|
|
|
- name: Build and Pack
|
|
shell: pwsh
|
|
working-directory: ./choco
|
|
run: ./build.ps1
|
|
env:
|
|
CI: true
|
|
|
|
- name: Push to Chocolatey
|
|
shell: pwsh
|
|
working-directory: ./choco
|
|
run: |
|
|
$package = Get-ChildItem *.nupkg | Select-Object -First 1
|
|
if ($package) {
|
|
choco push $($package.Name) --source "https://push.chocolatey.org/" --api-key ${{ secrets.CHOCO_API_KEY }}
|
|
} else {
|
|
Write-Error "No .nupkg file found to push."
|
|
exit 1
|
|
}
|