Merge pull request #36 from albx/35-upgrade-packages #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Http project to NuGet | |
on: | |
push: | |
branches: [ 'main' ] | |
paths: | |
- 'src/KITT.Web.ReCaptcha.Http/**' | |
workflow_dispatch: | |
env: | |
NET_VERSION: '8.x' | |
PROJECT_PATH: 'src/KITT.Web.ReCaptcha.Http' | |
PROJECT_FILE: 'KITT.Web.ReCaptcha.Http.csproj' | |
jobs: | |
publish: | |
name: Publish package to NuGet | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core SDK ${{ env.NET_VERSION }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.NET_VERSION }} | |
- name: Create nupkg file | |
run: dotnet pack -c Release -o . '${{ env.PROJECT_PATH }}/${{ env.PROJECT_FILE }}' | |
- name: Publish on NuGet | |
run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_APIKEY }} -s https://api.nuget.org/v3/index.json |