Skip to content

Publish

Publish #10

Workflow file for this run

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/github-action@master
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}}