Skip to content

Update actions/upload-artifact action to v4 - autoclosed #550

Update actions/upload-artifact action to v4 - autoclosed

Update actions/upload-artifact action to v4 - autoclosed #550

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
formatting:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Check formatting
run: dotnet format --verify-no-changes --severity error
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
env:
OS: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Print Debug Info
run: dotnet --info
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Run Tests
run: dotnet test --no-build --no-restore --logger "GitHubActions" --collect:"XPlat Code Coverage;Format=opencover"
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
fail_ci_if_error: false
env_vars: OS
flags: ${{ env.OS }}
- name: Publish (Linux)
if: runner.os == 'Linux'
run: dotnet publish other/GameFinder.Example/GameFinder.Example.csproj -o ${{ github.workspace }}/bin/${{ runner.os }} -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=false
- name: Publish (Windows)
if: runner.os == 'Windows'
run: dotnet publish other/GameFinder.Example/GameFinder.Example.csproj -o ${{ github.workspace }}/bin/${{ runner.os }} -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=false
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: GameFinder.Example-${{ runner.os }}-${{ github.sha }}
path: ${{ github.workspace }}/bin/${{ runner.os }}/GameFinder*
if-no-files-found: error