Update some packages #210
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 | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
env: | |
solution: ./dirs.proj | |
config: Release | |
ContinuousIntegrationBuild: "true" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
global-json-file: global.json | |
- name: Restore | |
run: dotnet restore $solution | |
- name: Build | |
run: dotnet build $solution --configuration $config --no-restore | |
- name: Test | |
run: dotnet test $solution --configuration $config --no-build | |
- name: Pack | |
run: dotnet pack $solution --configuration $config --no-build | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pkg | |
path: ./out/pkg | |
release: | |
needs: build | |
if: github.event_name == 'release' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Build Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: pkg | |
path: pkg | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
7.0.x | |
- name: Push Nuget | |
env: | |
NUGET_API: ${{ secrets.NUGET_API }} | |
run: dotnet nuget push pkg/**/*.nupkg | |
--api-key $NUGET_API | |
--source https://api.nuget.org/v3/index.json |