Merge pull request #183 from janusw/gha_mac #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Tests | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
linuxBuild: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Install dependencies | |
run: dotnet restore src/GeoJSON.Net.sln | |
- name: Build | |
run: dotnet build src/GeoJSON.Net.sln -c Release --no-restore -p:Version=$(git describe --tags) | |
- name: Test | |
run: dotnet test src/GeoJSON.Net.sln --no-restore --verbosity normal | |
macBuild: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.0.x | |
8.0.x | |
- name: Install dependencies | |
run: dotnet restore src/GeoJSON.Net.sln | |
- name: Build | |
run: dotnet build src/GeoJSON.Net.sln -c Release --no-restore -p:Version=$(git describe --tags) | |
- name: Test | |
run: dotnet test src/GeoJSON.Net.sln --no-restore --verbosity normal | |
winBuild: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Install dependencies | |
run: dotnet restore src/GeoJSON.Net.sln | |
- name: Build | |
run: dotnet build src/GeoJSON.Net.sln -c Release --no-restore -p:Version=$(git describe --tags) | |
- name: Upload package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nupkg | |
path: | | |
./src/GeoJSON.Net/bin/Release/*.nupkg | |
./src/GeoJSON.Net/bin/Release/*.snupkg | |
- name: Test | |
run: dotnet test src/GeoJSON.Net.sln --no-restore --verbosity normal |