Skip to content

Add support for extra properties on a Route #5

Add support for extra properties on a Route

Add support for extra properties on a Route #5

Workflow file for this run

# https://acraven.medium.com/a-nuget-package-workflow-using-github-actions-7da8c6557863
name: Upload package to NuGet
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
name: Upload package to NuGet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore
run: dotnet restore
- name: Set VERSION variable from tag (for tag pushes)
if: contains(github.ref, 'refs/heads')
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV

Check failure on line 23 in .github/workflows/nuget.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/nuget.yml

Invalid workflow file

You have an error in your yaml syntax on line 23
- name: Set VERSION variable from tag (for normal commits)
if: !contains(github.ref, 'refs/heads')
run: echo "VERSION=0.0.0" >> $GITHUB_ENV
- name: Build
run: dotnet build -c Release --no-restore /p:Version=${VERSION} /p:PackageVersion=${VERSION}
# - name: Test
# run: dotnet test -c Release --no-restore --no-build
- name: Pack
run: dotnet pack -c Release /p:Version=${VERSION} --no-restore
- name: Upload Package
run: dotnet nuget push AttribDoc/bin/Release/AttribDoc.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_TOKEN}
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}