AddFile support handler with context #126
Workflow file for this run
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: .NET Core | |
on: | |
push: | |
branches: ["main", "dev*"] | |
tags: ["*.*.*"] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
runs-on: [macos-11, ubuntu-22.04, windows-latest] | |
name: ${{ matrix.runs-on }} | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET 8.0.x, 7.0.x, 6.0.x, 5.0.x and 3.1.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
8.0.x | |
- name: Setup .NET 9.0.x Preview | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.0.x | |
dotnet-quality: 'preview' | |
- name: dotnet info | |
run: dotnet --info | |
- name: Install dependencies | |
run: dotnet restore --verbosity normal | |
- name: Build | |
run: dotnet build --configuration Release --no-restore --verbosity normal | |
- name: Test | |
run: dotnet test -c Release --no-build --verbosity normal | |
- name: Pack | |
run: dotnet pack -c Release -o ./artifacts/packages/ --no-build --verbosity normal | |
- if: ${{ success() && runner.os == 'Windows' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }} | |
name: Publish Nuget main to MyGet, GitHub and CloudSmith | |
run: | | |
dotnet nuget push .\artifacts\packages\*.nupkg -s https://www.myget.org/F/netlah/api/v2/package -k ${{ secrets.MYGET }} | |
dotnet nuget push .\artifacts\packages\*.nupkg -s https://nuget.pkg.github.com/NetLah/index.json --skip-duplicate -k ${{ secrets.PUSH_GITHUB_REGISTRY_TOKEN }} | |
dotnet nuget push .\artifacts\packages\*.nupkg -s https://nuget.cloudsmith.io/netlah/net-main1/v3/index.json --skip-duplicate -k ${{ secrets.PUSH_CLOUDSMITH_TOKEN }} | |
- name: Push CloudSmith dev | |
if: ${{ success() && runner.os == 'Windows' && (startsWith(github.ref, 'refs/heads/dev')) }} | |
run: dotnet nuget push .\artifacts\packages\*.nupkg -s https://nuget.cloudsmith.io/netlah/net-dev1/v3/index.json --skip-duplicate -k ${{ secrets.PUSH_CLOUDSMITH_TOKEN }} |