Skip to content

Check returned values first #49

Check returned values first

Check returned values first #49

Workflow file for this run

name: "Build, Test and Pack"
on:
push:
branches: [ master ]
# Trigger on release tags
tags: [ 'v[0-9]+*' ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: Event File
path: ${{ github.event_path }}
build-and-test:
name: "Build and Test"
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: '0'
- name: Install .NET Core
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build --configuration Release source/icu.net.sln
- name: Test
run: dotnet test --configuration Release --no-build source/icu.net.sln -- NUnit.TestOutputXml=TestResults
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: Test Results (${{matrix.os}})
path: "**/TestResults/*.xml"
- name: Pack
run: dotnet pack --configuration Release --no-build --include-symbols source/icu.net.sln
- name: Upload Artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: icu-dotnet-nugetpackage
path: |
output/*.nupkg
output/*.snupkg
if: matrix.os == 'ubuntu-latest'
publish-nuget:
name: "Publish NuGet package"
runs-on: ubuntu-latest
needs: build-and-test
if: github.event_name == 'push'
steps:
- name: Download Artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
path: artifacts
- name: Publish to Nuget
run: dotnet nuget push artifacts/**/*.*nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.SILLSDEV_PUBLISH_NUGET_ORG}} --skip-duplicate