Skip to content

Bump CSharpFunctionalExtensions from 2.42.0 to 3.0.0 #167

Bump CSharpFunctionalExtensions from 2.42.0 to 3.0.0

Bump CSharpFunctionalExtensions from 2.42.0 to 3.0.0 #167

Workflow file for this run

name: Build & test & publish
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
jobs:
# Build packages & run tests
build:
name: Build & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Build project
run: ./build.sh -Target All
- name: Upload test results
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: test-results
path: test-results
if-no-files-found: error
retention-days: 7
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: packages
path: artifacts/*.nupkg
if-no-files-found: error
retention-days: 7
# Report tests
test-report:
name: Report tests
runs-on: ubuntu-latest
needs: [ build ]
if: ${{ always() }}
permissions:
contents: read
actions: read
checks: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download test results
uses: actions/download-artifact@v4
with:
name: test-results
path: test-results/
- name: Report tests
uses: dorny/test-reporter@v1
if: ${{ always() }}
with:
name: .NET Tests
path: ./test-results/**/*.trx
reporter: dotnet-trx
- name: Upload code coverage report
uses: codecov/codecov-action@v4
if: ${{ always() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./test-results/
fail_ci_if_error: true
# Publish packages to nuget.org
publish-to-nuget-org:
name: Publish to NuGet.org
needs: [ build ]
environment: NuGet.org
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Download packages
uses: actions/download-artifact@v4
with:
name: packages
path: packages/
- name: Publish packages
run: dotnet nuget push --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} packages/*.nupkg