Skip to content

[DO NOT MERGE] Test 23.10.0 release. #181

[DO NOT MERGE] Test 23.10.0 release.

[DO NOT MERGE] Test 23.10.0 release. #181

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- master
tags:
- v*
defaults:
run:
shell: bash
jobs:
build-dotnet:
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
framework: [net48, net5.0, net6.0, net7.0]
os: [ubuntu-latest]
test: [""]
configuration: [release]
docker-tag: ['23.10.0-focal']
runs-on: ${{ matrix.os }}
name: build-${{ matrix.os }}/${{ matrix.framework }}/${{ matrix.docker-tag }}/EventStore.ClientAPI${{ matrix.test }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull EventStore Image
run: |
docker pull ghcr.io/eventstore/eventstore:${{ matrix.docker-tag }}
- name: Install dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
- name: Restore
run: |
dotnet restore
- name: Vulnerability Scan
run: |
dotnet list package --vulnerable --include-transitive --framework=${{ matrix.framework }} | tee vulnerabilities.txt
! cat vulnerabilities.txt | grep -q "has the following vulnerable packages"
- name: Compile
run: |
dotnet build --configuration ${{ matrix.configuration }} --framework ${{ matrix.framework }} src/EventStore.ClientAPI${{ matrix.test }}
- name: Run Tests
env:
ES_DOCKER_TAG: ${{ matrix.docker-tag }}
run: |
./gencert.sh
dotnet test --configuration ${{ matrix.configuration }} --blame \
--logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
--framework ${{ matrix.framework }} \
test/EventStore.ClientAPI${{ matrix.test }}.Tests
publish:
timeout-minutes: 5
needs: [build-dotnet]
runs-on: ubuntu-latest
name: publish
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Version
id: get_version
run: |
echo "branch=${GITHUB_REF}" >> $GITHUB_OUTPUT
dotnet tool restore
version=$(dotnet tool run minver -- --tag-prefix=v)
echo "version=${version}" >> $GITHUB_OUTPUT
- name: Install dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
- name: Dotnet Pack
run: |
dotnet pack /p:Version=${{ steps.get_version.outputs.version }} --configuration=Release --output=./packages \
/p:NoWarn=NU5105 \
/p:RepositoryUrl=https://github.com/EventStore/EventStoreDB-Client-Dotnet-Legacy \
/p:RepositoryType=git
- name: Publish Artifacts
uses: actions/upload-artifact@v1
with:
path: packages
name: nuget-packages
- name: Dotnet Push to Github Packages
if: github.event_name == 'push'
run: |
dotnet tool restore
find . -name "*.nupkg" | xargs -n1 dotnet tool run gpr -- push --api-key=${{ secrets.github_token }}
- name: Dotnet Push to Nuget.org
if: github.event_name == 'push' && startsWith(steps.get_version.outputs.branch, 'refs/tags/v')
run: |
dotnet tool restore
find . -name "*.nupkg" | xargs -n1 dotnet nuget push --api-key=${{ secrets.nuget_key }} --source https://api.nuget.org/v3/index.json