Bump Sentry.Serilog from 3.39.1 to 5.0.1 (#1199) #3046
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: .NET | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
release: | |
types: | |
- published | |
env: | |
NUGET_KEY: ${{ secrets.NUGET_KEY }} | |
NUGET_FEED: https://api.nuget.org/v3/index.json | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
- name: check format | |
run: dotnet format --severity error --verify-no-changes ./Motor.NET.sln | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
- name: Install dependencies | |
run: dotnet restore Motor.NET.sln | |
- name: Build | |
run: dotnet build --configuration Release --no-restore Motor.NET.sln | |
- name: Test .NET8 | |
run: dotnet test --no-restore Motor.NET.sln --framework net8.0 | |
- name: Test .NET9 | |
run: dotnet test --no-restore Motor.NET.sln --framework net9.0 | |
- name: Pack | |
run: dotnet pack -v minimal -c Release --no-restore -o ./artifacts Motor.NET.sln | |
- name: Publish Bridge | |
run: dotnet publish --framework net9.0 -v minimal -c Release --no-restore -o ./artifacts-bridge ./src/Motor.Extensions.Hosting.Bridge/Motor.Extensions.Hosting.Bridge.csproj | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: | | |
./artifacts/*.nupkg | |
./artifacts/*.snupkg | |
- name: Upload Artifact Bridge | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts-bridge | |
path: ./artifacts-bridge/* | |
#code-ql: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Initialize CodeQL | |
# uses: github/codeql-action/init@v1 | |
# with: | |
# languages: csharp | |
# - name: Setup .NET | |
# uses: actions/setup-dotnet@v1 | |
# with: | |
# dotnet-version: 7.0.x | |
# - name: Install dependencies | |
# run: dotnet restore Motor.NET.sln | |
# - name: Build | |
# run: dotnet build --configuration Release --no-restore Motor.NET.sln | |
# - name: Perform CodeQL Analysis | |
# uses: github/codeql-action/analyze@v1 | |
deploy: | |
needs: build | |
if: github.event_name == 'release' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: artifacts | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
- name: Push to NuGet Feed | |
run: dotnet nuget push './artifacts/*.nupkg' --skip-duplicate --source $NUGET_FEED --api-key $NUGET_KEY | |
build-bridge: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
id: download | |
uses: actions/download-artifact@v4 | |
with: | |
name: artifacts-bridge | |
- name: Prepare | |
id: prep | |
run: | | |
DOCKER_IMAGE=ghcr.io/gdatasoftwareag/motornet/bridge | |
VERSION=edge | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
VERSION=${GITHUB_REF#refs/tags/} | |
elif [[ $GITHUB_REF == refs/heads/* ]]; then | |
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') | |
elif [[ $GITHUB_REF == refs/pull/* ]]; then | |
VERSION=pr-${{ github.event.number }} | |
fi | |
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${VERSION}-${GITHUB_SHA::8}" | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
echo "tags=${TAGS}" >> $GITHUB_OUTPUT | |
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT | |
- name: Login to Github Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push to GitHub Packages | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ github.event_name == 'release' }} | |
context: "${{ steps.download.outputs.download-path }}" | |
tags: ${{ steps.prep.outputs.tags }} | |
labels: | | |
org.opencontainers.image.revision=${{ github.sha }} | |
org.opencontainers.image.created=${{ steps.prep.outputs.created }} |