3.0.1 #4
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
# This workflow will release BBT.StructureTools | |
name: Release | |
on: | |
release: | |
types: [published] | |
defaults: | |
run: | |
working-directory: src | |
jobs: | |
build: | |
env: | |
BUILD_CONFIG: "Release" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get Build Version | |
run: | | |
Import-Module ..\build\GetBuildVersion.psm1 | |
Write-Host $Env:GITHUB_REF | |
$version = GetBuildVersion -VersionString $Env:GITHUB_REF | |
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
shell: pwsh | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration $BUILD_CONFIG -p:Version=$BUILD_VERSION --no-restore | |
- name: Test | |
run: dotnet test -p:Configuration=$BUILD_CONFIG --no-restore --no-build --verbosity normal --collect:"XPlat Code Coverage" | |
- name: Codecov | |
uses: codecov/[email protected] | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v1 | |
- name: Package NuGet | |
run: | | |
dotnet pack -c $BUILD_CONFIG -p:PackageVersion=$BUILD_VERSION | |
- name: Publish NuGet | |
run: | | |
nuget push ./BBT.StructureTools/bin/Release/BBT.StructureTools.$BUILD_VERSION.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGETORG}} | |
nuget push ./BBT.StructureTools.Extensions/bin/Release/BBT.StructureTools.Extensions.$BUILD_VERSION.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGETORG}} |