Skip to content

Bump upload-artifact action version #6

Bump upload-artifact action version

Bump upload-artifact action version #6

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
publish:
if: github.ref == 'refs/heads/main'
needs: test
strategy:
fail-fast: false
matrix:
include:
- rid: 'win-x64'
os: 'windows-latest'
- rid: 'linux-x64'
os: 'ubuntu-latest'
- rid: 'osx-x64'
os: 'macos-latest'
runs-on: ${{ matrix.os }}
name: Publish for ${{ matrix.rid }}
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore -r ${{ matrix.rid }} D3pth.CLI/D3pth.CLI.csproj
- name: Build
run: dotnet build --no-restore -c Release -r ${{ matrix.rid }} D3pth.CLI/D3pth.CLI.csproj
- name: Publish
run: dotnet publish --no-build -c Release -r ${{ matrix.rid }} -o publish D3pth.CLI/D3pth.CLI.csproj
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: publish-${{ matrix.rid }}
path: publish/*