Skip to content

Correct changelog path #17

Correct changelog path

Correct changelog path #17

name: "build-and-publish"
on:
push:
tags:
- "v*"
env:
PROJECT_PATH: GameLib/GameLib.csproj
PACKAGE_OUTPUT_DIR: ${{ github.workspace }}\output
NUGET_SOURCE_URL: "https://api.nuget.org/v3/index.json"
jobs:
build:
name: "build"
runs-on: "windows-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Install dotnet"
uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.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: "Get version"
id: version
uses: battila7/get-version-action@v2
- name: "Pack project"
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --configuration Release --p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIR }}
- name: "Push package"
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIR }}\*.nupkg --api-key ${{ secrets.NUGET_AUTH_TOKEN }} --source ${{ env.NUGET_SOURCE_URL }}