Skip to content

General adjustments #40

General adjustments

General adjustments #40

Workflow file for this run

name: Build and publish package
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
env:
PROJECT_PATH: 'Framework.Core/Framework.Core.csproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json'
jobs:
deploy:
name: 'Deploy'
runs-on: 'windows-latest'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: 'Restore packages'
run: dotnet restore ${{ env.PROJECT_PATH }}
- name: 'Build project'
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
- name: 'Pack project'
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: 'Push package'
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg --api-key ${{ secrets.NUGET_AUTH_TOKEN }} --source ${{ env.NUGET_SOURCE_URL }} --skip-duplicate