Skip to content

Merge pull request #152 from thompson-tomo/chore/#149_DependenciesTweak #345

Merge pull request #152 from thompson-tomo/chore/#149_DependenciesTweak

Merge pull request #152 from thompson-tomo/chore/#149_DependenciesTweak #345

Workflow file for this run

name: "Deploy to NuGet"
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
- 'v[0-9]+\.[0-9]+\.[0-9]+-beta[0-9][0-9]'
env:
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json'
jobs:
deploy:
name: 'Nuget Push'
runs-on: 'windows-latest'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Install dotnet'
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: 'Get Version'
id: version
uses: battila7/get-version-action@v2
- name: Test
run: dotnet test --configuration Debug --logger "trx;LogFileName=test-results.trx"
- name: 'Pack project'
run: dotnet pack --configuration Release --include-symbols -p:Version=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: 'Push package'
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }}