Skip to content

Bump Microsoft.NET.Test.Sdk from 18.5.1 to 18.6.0 #263

Bump Microsoft.NET.Test.Sdk from 18.5.1 to 18.6.0

Bump Microsoft.NET.Test.Sdk from 18.5.1 to 18.6.0 #263

Workflow file for this run

name: Build
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_ENVIRONMENT: github
ASPNETCORE_ENVIRONMENT: github
BUILD_PATH: "${{github.workspace}}/artifacts"
on:
push:
branches:
- main
- develop
tags:
- "v*"
pull_request:
branches:
- main
- develop
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
- name: Restore Dependencies
run: dotnet restore
- name: Build Solution
run: dotnet build --no-restore --configuration Release
- name: Run Test
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings
- name: Report Coverage
if: success()
continue-on-error: true
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: "${{github.workspace}}/test/*/TestResults/*/coverage.info"
format: lcov
- name: Create Packages
if: success() && github.event_name != 'pull_request'
run: dotnet pack --configuration Release --no-build --output "${{env.BUILD_PATH}}"
- name: Upload Packages
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v7
with:
name: packages
path: "${{env.BUILD_PATH}}"
deploy:
runs-on: ubuntu-latest
needs: build
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
permissions:
contents: read
packages: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v8
with:
name: packages
- name: Publish Packages GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for package in $(find . -name "*.nupkg"); do
echo "${0##*/}: Pushing $package..."
dotnet nuget push "$package" --source https://nuget.pkg.github.com/loresoft/index.json --api-key "$GITHUB_TOKEN" --skip-duplicate
done
- name: Publish Packages feedz
env:
FEEDDZ_KEY: ${{ secrets.FEEDDZ_KEY }}
run: |
for package in $(find . -name "*.nupkg"); do
echo "${0##*/}: Pushing $package..."
dotnet nuget push "$package" --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key "$FEEDDZ_KEY" --skip-duplicate
done
- name: Publish Packages Nuget
if: startsWith(github.ref, 'refs/tags/v')
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
run: |
for package in $(find . -name "*.nupkg"); do
echo "${0##*/}: Pushing $package..."
dotnet nuget push "$package" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_KEY" --skip-duplicate
done