Skip to content

Merge pull request #35 from khanage/update-dotnet-standard #43

Merge pull request #35 from khanage/update-dotnet-standard

Merge pull request #35 from khanage/update-dotnet-standard #43

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Publish Bearded.Monads
on:
push:
branches:
- main
env:
BUILD_NUMBER: ${{ vars.MAJOR_VERSION }}.${{ vars.MINOR_VERSION }}.${{ github.run_number }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: dotnet build --configuration Release /p:Version=$BUILD_NUMBER
- name: Test
run: dotnet test --configuration Release --no-build
- name: Publish
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet pack /p:Version=$BUILD_NUMBER -c Release -o .
dotnet nuget push ./Bearded.Monads.$BUILD_NUMBER.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY