Skip to content

Update GitHub actions #82

Update GitHub actions

Update GitHub actions #82

Workflow file for this run

name: Build
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
NUGET_AUTH_TOKEN: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}
on:
push:
branches: '*'
pull_request:
branches: 'main'
defaults:
run:
working-directory: src
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
- name: Pack
run: dotnet pack -c:Release
- name: Test
run: dotnet test
- name: Push
if: github.ref == 'refs/heads/main'
run: dotnet nuget push "../bin/Release/*.nupkg" -k ${{ secrets.PACKAGE_REGISTRY_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate