Skip to content

ci: fix publish_nuget.yml #347

ci: fix publish_nuget.yml

ci: fix publish_nuget.yml #347

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'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: 'ubuntu-latest'
services:
azurite:
image: mcr.microsoft.com/azure-storage/azurite:latest
ports:
- 10000:10000
- 10001:10001
- 10002:10002
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
ports:
- 1433:1433
env:
ACCEPT_EULA: 'Y'
MSSQL_SA_PASSWORD: 'ArkSpecFlow123Stella!'
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 }}