Merge pull request #15 from stackql/feature/stackql-release-update #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |