Skip to content

publish

publish #28

Workflow file for this run

name: Publish
on:
release:
types: [published]
repository_dispatch:
types: [publish]
env:
PROJECT_PATH: src/Crowdin.Api
PROJECT_CSPROJ_PATH: src/Crowdin.Api/Crowdin.Api.csproj
jobs:
publish-nuget:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Build the project
run: dotnet build -c Release ${{ env.PROJECT_CSPROJ_PATH }}
- name: Create the package
run: dotnet pack -c Release ${{ env.PROJECT_CSPROJ_PATH }}
- name: Publish the package to NuGet
run: dotnet nuget push ${{ env.PROJECT_PATH }}/bin/Release/*.nupkg -s https://nuget.org -k ${{ secrets.NUGET_KEY }}