Skip to content

.NET 4.8 Framework support #254

.NET 4.8 Framework support

.NET 4.8 Framework support #254

Workflow file for this run

name: Publish
on:
pull_request:
push:
branches:
- master
tags:
- v*
jobs:
vulnerability-scan:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
framework: [ net48, net6.0, net7.0, net8.0 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
name: scan-vulnerabilities/${{ matrix.os }}/${{ matrix.framework }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Scan for Vulnerabilities
shell: bash
run: |
dotnet nuget list source
dotnet restore
dotnet list package --vulnerable --include-transitive --framework ${{ matrix.framework }} | tee vulnerabilities.txt
! cat vulnerabilities.txt | grep -q "has the following vulnerable packages"
build-samples:
timeout-minutes: 5
name: build-samples/${{ matrix.os }}/${{ matrix.framework }}
strategy:
fail-fast: false
matrix:
framework: [ net48, net6.0, net7.0, net8.0 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
services:
esdb:
image: ghcr.io/eventstore/eventstore:lts
env:
EVENTSTORE_INSECURE: true
EVENTSTORE_MEMDB: true
EVENTSTORE_RUN_PROJECTIONS: all
EVENTSTORE_START_STANDARD_PROJECTIONS: true
ports:
- 2113:2113
options: --health-cmd "exit 0"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Compile
shell: bash
run: |
dotnet build samples
- name: Run
shell: bash
run: |
find samples/ -type f -iname "*.csproj" -print0 | xargs -0L1 dotnet run --framework ${{ matrix.framework }} --project
test:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
framework: [ net48, net6.0, net7.0 ]
os: [ ubuntu-latest, windows-latest ]
configuration: [ release ]
runs-on: ${{ matrix.os }}
name: test/EventStore.Client/${{ matrix.os }}/${{ matrix.framework }}
steps:
- name: Checkout
uses: actions/checkout@v3
- shell: bash
run: |
git fetch --prune --unshallow
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Compile
shell: bash
run: |
dotnet build --configuration ${{ matrix.configuration }} --framework ${{ matrix.framework }} src/EventStore.Client
- name: Run Tests
shell: bash
run: |
dotnet test --configuration ${{ matrix.configuration }} --blame \
--logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
--framework ${{ matrix.framework }} \
test/EventStore.Client.Tests
publish:
timeout-minutes: 5
needs: [ vulnerability-scan, test, build-samples ]
runs-on: ubuntu-latest
name: publish
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Version
id: get_version
run: |
echo "branch=${GITHUB_REF:10}" >> $GITHUB_OUTPUT
dotnet nuget list source
dotnet tool restore
version=$(dotnet tool run minver -- --tag-prefix=v)
echo "version=${version}" >> $GITHUB_OUTPUT
- shell: bash
run: |
git fetch --prune --unshallow
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Dotnet Pack
shell: bash
run: |
mkdir -p packages
dotnet pack /p:Version=${{ steps.get_version.outputs.version }} --configuration=Release \
/p:PublishDir=./packages \
/p:NoWarn=NU5105 \
/p:RepositoryUrl=https://github.com/EventStore/EventStore-Client-Dotnet \
/p:RepositoryType=git
- name: Publish Artifacts
uses: actions/upload-artifact@v1
with:
path: packages
name: nuget-packages
- name: Dotnet Push to Github Packages
shell: bash
if: github.event_name == 'push'
run: |
dotnet tool restore
find . -name "*.nupkg" | xargs -n1 dotnet nuget push --api-key=${{ secrets.github_token }} --source https://nuget.pkg.github.com/EventStore/index.json --skip-duplicate
- name: Dotnet Push to Nuget.org
shell: bash
if: contains(steps.get_version.outputs.branch, 'v')
run: |
dotnet nuget list source
dotnet tool restore
find . -name "*.nupkg" | xargs -n1 dotnet nuget push --api-key=${{ secrets.nuget_key }} --source https://api.nuget.org/v3/index.json --skip-duplicate