Skip to content

Minor changes of configuration (#45) #12

Minor changes of configuration (#45)

Minor changes of configuration (#45) #12

Workflow file for this run

name: "Publish"
on:
push:
tags:
- 'v*'
env:
PROJECT_NAME: 'PowerPipe'
PROJECT_PATH: 'src/PowerPipe/PowerPipe.csproj'
PROJECT_EXTENSIONS_NAME: 'PowerPipe.Extensions.MicrosoftDependencyInjection'
PROJECT_EXTENSIONS_PATH: 'src/PowerPipe.Extensions.MicrosoftDependencyInjection/PowerPipe.Extensions.MicrosoftDependencyInjection.csproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json'
jobs:
publish:
name: Build&Publish packages
runs-on: 'windows-latest'
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Get Version
id: version
uses: nowsprinting/check-version-format-action@v3
with:
prefix: 'v'
- name: Build&Publish PowerPipe
run: |
dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.full_without_prefix }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\${{ env.PROJECT_NAME }}.${{ steps.version.outputs.full_without_prefix }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.NUGET_SOURCE_URL }}
- name: Build&Publish PowerPipe.Extensions.MicrosoftDependencyInjection
run: |
dotnet build ${{ env.PROJECT_EXTENSIONS_PATH }} --no-restore --configuration Release
dotnet pack ${{ env.PROJECT_EXTENSIONS_PATH }} --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.full_without_prefix }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\${{ env.PROJECT_EXTENSIONS_NAME }}.${{ steps.version.outputs.full_without_prefix }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.NUGET_SOURCE_URL }}