Version 3.0.0 #12
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: Publish | |
on: | |
release: | |
types: [ published ] | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
build-tests: | |
name: Tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build | |
run: dotnet build --configuration Release | |
- name: Run unit tests | |
run: dotnet test --no-build --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=lcov | |
- name: Publish coverage report to Coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./Bynder/Test/coverage.info | |
continue-on-error: true | |
publish-nuget: | |
name: Release | |
runs-on: ubuntu-22.04 | |
needs: build-tests | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Publish to NuGet | |
uses: brandedoutcast/[email protected] | |
with: | |
PROJECT_FILE_PATH: Bynder/Sdk/Bynder.Sdk.csproj | |
VERSION_REGEX: '^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$' | |
TAG_FORMAT: '*' | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} |