build: add SourceLink support, and include README to package #2
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: 'Deploy: Production' | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
PACKAGE_OUTPUT: ${{ github.workspace }}/package | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: Production | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: .NET Setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v0 | |
with: | |
versionSpec: '5.x' | |
- name: Determine Version | |
uses: gittools/actions/gitversion/execute@v0 | |
- name: Restoring | |
run: dotnet restore -v normal | |
- name: Building | |
run: dotnet build -c Release --no-restore -v normal | |
- name: Testing | |
run: dotnet test -c Release --no-restore --no-build -v normal | |
- name: Packing (w/ Symbols) | |
run: dotnet pack -c Release --no-restore --no-build -v normal -o ${{ env.PACKAGE_OUTPUT }} -p:Version=${{ env.GitVersion_SemVer }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg | |
- name: Pushing | |
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT }}/*.nupkg -k ${{ secrets.NUGET_REPOSITORY_KEY }} -s ${{ vars.NUGET_REPOSITORY_SOURCE }} |