Create a (Pre)release on NuGet #3
Workflow file for this run
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: Create a (Pre)release on NuGet | |
on: | |
workflow_dispatch: # Allow running the workflow manually from the GitHub UI | |
release: | |
types: | |
- published # Run the workflow when a new GitHub release is published | |
jobs: | |
release-nuget: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Restore dependencies | |
run: dotnet restore engine/Orbit.Engine/Orbit.Engine.csproj | |
- name: Build | |
run: dotnet build engine/Orbit.Engine/Orbit.Engine.csproj -c Release | |
- name: Pack | |
run: dotnet pack engine/Orbit.Engine/Orbit.Engine.csproj -c Release | |
- name: Push | |
run: dotnet nuget push Orbit.Engine.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }} |