Skip to content

fix: use --use-current-runtime for cross-platform publish in CI (#8) #8

fix: use --use-current-runtime for cross-platform publish in CI (#8)

fix: use --use-current-runtime for cross-platform publish in CI (#8) #8

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Restore
run: dotnet restore CrawlerSamples.sln --use-current-runtime
- name: Build
run: dotnet build CrawlerSamples.sln -c Release --no-restore
- name: Publish
run: >
dotnet publish src/CrawlerSamples.ConsoleApp/CrawlerSamples.ConsoleApp.csproj
-c Release
--use-current-runtime
--self-contained
-o artifacts/publish
- name: Upload publish artifact
uses: actions/upload-artifact@v4
with:
name: crawler-samples-${{ matrix.os }}
path: artifacts/publish
if-no-files-found: error
retention-days: 7