Skip to content

Upgrading to get rid of some of the Github Action warnings. #12

Upgrading to get rid of some of the Github Action warnings.

Upgrading to get rid of some of the Github Action warnings. #12

Workflow file for this run

name: Build and Push to Nuget
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [8.x]
services:
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
SA_PASSWORD: trackable_core!@44
ACCEPT_EULA: 'Y'
ports:
- 1433:1433
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
- name: Run Tests
run: dotnet test
env:
ConnectionString: Data Source=localhost;User ID=sa;Password=trackable_core!@44;MultipleActiveResultSets=True;Encrypt=False;
- name: Pack
run: dotnet build -c Release -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
- name: Publish
if: github.event_name != 'pull_request' && (github.ref_name == 'master')
run: |
dotnet nuget push **/bin/Release/*.nupkg --source 'https://api.nuget.org/v3/index.json' -k ${{ secrets.NUGETKEY }} --skip-duplicate
dotnet nuget push **/bin/Release/*.snupkg --source 'https://api.nuget.org/v3/index.json' -k ${{ secrets.NUGETKEY }} --skip-duplicate