Skip to content

⬆️ Bump files with dotnet-file sync #1791

⬆️ Bump files with dotnet-file sync

⬆️ Bump files with dotnet-file sync #1791

Workflow file for this run

# Builds and runs tests in all three supported OSes
# Pushes CI feed if secrets.SLEET_CONNECTION is provided
name: build
on:
workflow_dispatch:
inputs:
configuration:
type: choice
description: Configuration
options:
- Release
- Debug
push:
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
paths-ignore:
- changelog.md
- readme.md
pull_request:
types: [opened, synchronize, reopened]
env:
DOTNET_NOLOGO: true
VersionPrefix: 42.42.${{ github.run_number }}
VersionLabel: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MSBUILDTERMINALLOGGER: auto
Configuration: ${{ github.event.inputs.configuration || 'Release' }}
defaults:
run:
shell: bash
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
name: build-${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
- name: ⚙ msbuild
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.1
- name: 🙏 restore
if: matrix.os == 'windows-latest'
shell: pwsh
working-directory: src/NuGetizer.Tests
run: |
dotnet restore Scenarios/given_a_packaging_project/a.nuproj
dotnet workload restore Scenarios/given_multitargeting_libraries/uilibrary.csproj
- name: 🙏 build (windows)
if: matrix.os == 'windows-latest'
shell: pwsh
working-directory: src/NuGetizer.Tests
run: |
# THIS IS IMPORTANT: WE NEED TO BUILD WITH DESKTOP MSBUILD
msbuild -r
- name: 🙏 build (linux)
if: matrix.os == 'ubuntu-latest'
run: dotnet build src/NuGetizer.Tests/NuGetizer.Tests.csproj -c:${{ env.Configuration }}
- name: 🐛 logs
uses: actions/upload-artifact@v4
if: runner.debug && always()
with:
name: binlog-build-${{ matrix.os }}-${{ github.run_number }}
path: src/NuGetizer.Tests/msbuild.binlog
- name: 🧪 test
run: |
dotnet tool update -g dotnet-retest
dotnet retest -- --no-build -c:${{ env.Configuration }}
- name: 📦 pack
if: matrix.os == 'windows-latest'
run: dotnet pack -m:1 -c:${{ env.Configuration }}
- name: 🐛 logs
uses: actions/upload-artifact@v4
if: runner.debug && always() && matrix.os == 'windows-latest'
with:
name: binlog-pack-${{ github.run_number }}
path: msbuild.binlog
- name: 🚀 sleet
if: matrix.os == 'windows-latest' && env.SLEET_CONNECTION != ''
env:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
run: |
dotnet tool install -g --version 4.0.18 sleet
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"
dotnet-format:
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
- name: ✓ ensure format
run: |
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget