Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ikpil committed Mar 2, 2024
1 parent d438f12 commit 9aa5694
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,49 @@ name: .NET

on:
push:
branches:
branches:
- 'main'
- 'pr/**'
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '**.yml'
pull_request:
branches:
- 'pr/**'
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '**.yml'


jobs:
build-and-test:
name: test-${{matrix.os}}
name: test-${{matrix.os}}-${{matrix.dotnet-version}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
dotnet-version: [ '8.x' ]
dotnet-version: [ '6', '7', '8' ]
os: [ windows-latest, ubuntu-latest, macos-latest ]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Get all history to allow automatic versioning using MinVer
submodules: recursive

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}

dotnet-version: ${{ matrix.dotnet-version }}.x
- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build -c Release --no-restore
run: dotnet build -c Release --no-restore --framework net${{ matrix.dotnet-version }}.0

- name: Test
run: dotnet test -c Release --no-build --verbosity normal
run: dotnet test -c Release --no-build --verbosity normal --framework net${{ matrix.dotnet-version }}.0
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: dotnet test -c Release --no-build --verbosity normal

- name: publish to local
run: dotnet publish src/DotFastLZ.Packaging.Tools -c Release --no-restore --no-self-contained --output working-temp
run: dotnet publish src/DotFastLZ.Packaging.Tools -c Release --framework net8.0 --no-restore --no-self-contained --output working-temp

- name: version
id: version
Expand Down

0 comments on commit 9aa5694

Please sign in to comment.