build(deps): bump FluentAssertions from 7.0.0 to 8.0.0 #760
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: .NET 6.0 | |
on: | |
push: | |
branches: [ develop, master ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ develop, master ] | |
env: | |
# Stop wasting time caching packages | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
# Disable sending usage data to Microsoft | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
# Project name to pack and publish | |
PROJECT_NAME: Job.Scheduler | |
# GitHub Packages Feed settings | |
GITHUB_FEED: https://nuget.pkg.github.com/Belphemur/ | |
GITHUB_USER: Belphemur | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Official NuGet Feed settings | |
NUGET_FEED: https://api.nuget.org/v3/index.json | |
NUGET_KEY: ${{ secrets.NUGET_KEY }} | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-nuget-${{ hashFiles('Job.Scheduler/Job.Scheduler.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget | |
- name: Restore | |
run: dotnet restore | |
- name: Build | |
run: dotnet build -c Release --no-restore | |
- name: Test | |
run: dotnet test -c Release --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dotnet-results-${{ matrix.dotnet-version }} | |
path: TestResults-${{ matrix.dotnet-version }} | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Pack Main | |
if: matrix.os == 'ubuntu-latest' | |
run: dotnet pack -v normal -c Release --no-restore --include-source -o nupkg -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PackageVersion="0.0.0-nightly${GITHUB_RUN_ID}" $PROJECT_NAME/$PROJECT_NAME.*proj | |
- name: Pack Asp.Net Core | |
if: matrix.os == 'ubuntu-latest' | |
run: dotnet pack -v normal -c Release --no-restore --include-source -o nupkg -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PackageVersion="0.0.0-nightly${GITHUB_RUN_ID}" ${PROJECT_NAME}.AspNetCore/${PROJECT_NAME}.AspNetCore.*proj | |
- name: Upload Artifact | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nupkg | |
path: nupkg/*.*nupkg | |
prerelease: | |
needs: build | |
if: github.ref == 'refs/heads/develop' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: nupkg | |
path: nupkg | |
- name: Push to GitHub Feed | |
run: | | |
for f in ./nupkg/*.nupkg | |
do | |
curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED | |
done | |
- name: Clean up old Main packages | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: "${{env.PROJECT_NAME}}" | |
min-versions-to-keep: 5 | |
package-type: 'nuget' | |
ignore-versions: '^\\d{1,8}\\.\\d+\\.\\d+$' | |
- name: Clean up old Asp.net Core packages | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: "${{env.PROJECT_NAME}}.AspNetCore" | |
min-versions-to-keep: 5 | |
package-type: 'nuget' | |
ignore-versions: '^\\d{1,8}\\.\\d+\\.\\d+$' | |
deploy: | |
needs: build | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Cache .NET deps | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-nuget-${{ hashFiles('Job.Scheduler/Job.Scheduler.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install semantic-release dependencies | |
run: npm ci | |
- name: Release | |
run: npx semantic-release | |
- name: Push to GitHub Feed | |
run: | | |
for f in ./nupkg/*.nupkg | |
do | |
curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED | |
done |