Skip to content

v6.0.3

v6.0.3 #4

Workflow file for this run

name: nuget
on:
release:
types: [ published ]
tags:
- v*
jobs:
nuget:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
SOLUTION_PATH: ./src/6.0/
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build $SOLUTION_PATH -c Release
- name: Test
run: dotnet test $SOLUTION_PATH -c Release --no-build
- name: Pack nugets
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo VERSION=$VERSION
dotnet pack $SOLUTION_PATH -c Release --no-build --output . /p:Version=$VERSION
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_ORG_API_KEY}} --source https://api.nuget.org/v3/index.json