Skip to content

Merge pull request #82 from ocluse/dev #32

Merge pull request #82 from ocluse/dev

Merge pull request #82 from ocluse/dev #32

Workflow file for this run

name: Publish Packages
on:
push:
branches: [ "main" ]
paths:
- 'src/**'
- '.github/workflows/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build packages
run: dotnet build --no-restore
- name: Run tests
run: dotnet test --no-build
#PUBLISH
- name: Publish to Nuget
run: dotnet nuget push "./build/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish to GitHub
run: dotnet nuget push "./build/*.nupkg" -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/ocluse/index.json --skip-duplicate