dep: Update dependency Serilog.Sinks.Async to v2 #72
Workflow file for this run
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: CI | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
ProjectName: ${{ github.event.repository.name }} | |
jobs: | |
check_format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Check .NET format | |
run: dotnet format -v diag --verify-no-changes | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- windows-latest | |
- ubuntu-latest | |
- macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Run tests | |
run: dotnet test -c Release | |
build: | |
needs: [check_format, test] | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: dotnet build -c Release | |
- name: Push nuget packages | |
working-directory: ${{ github.event.repository.name }}/bin/Release | |
run: | | |
dotnet nuget push *.nupkg -s https://nuget.pkg.github.com/HMBSbige -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate | |
dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NuGetAPIKey }} --skip-duplicate | |
dotnet nuget push *.snupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NuGetAPIKey }} --skip-duplicate | |
docker: | |
needs: [check_format, test] | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
env: | |
ProjectName: fakea2sserver | |
Owner: hmbsbige | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
push: ${{ github.ref_name == 'master' }} | |
tags: ghcr.io/${{ env.Owner }}/${{ env.ProjectName }}:master | |
platforms: linux/amd64,linux/arm64 | |
- name: Push | |
uses: docker/build-push-action@v5 | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | |
with: | |
push: true | |
tags: | | |
ghcr.io/${{ env.Owner }}/${{ env.ProjectName }}:${{ github.ref_name }} | |
ghcr.io/${{ env.Owner }}/${{ env.ProjectName }}:latest | |
platforms: linux/amd64,linux/arm64 | |
release: | |
needs: [build, docker] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: false | |
prerelease: false |