Skip to content
on:
push:
branches:
- main
jobs:
deploy:
runs-on: windows-latest
outputs:
version: ${{ steps.set_version.outputs.version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Extract Version from .nuspec
run: |
$xml = [xml](Get-Content stackql/stackql.nuspec)
$version = $xml.package.metadata.version
echo "Extracted version: $version"
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV
- name: Create Chocolatey Package
run: |
echo "creating package for version ${{ env.VERSION }}"
cd stackql
choco pack
- name: Install and Test Chocolatey Package
run: choco install stackql --source . -y
- name: Push Package to Chocolatey
run: |
choco push "stackql/stackql.${{ env.VERSION }}.nupkg" --source https://push.chocolatey.org/ --api-key ${{ secrets.CHOCOLATEY_API_KEY }}
env:
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}