Skip to content

publish

publish #62

Workflow file for this run

name: publish
on:
workflow_run:
workflows: [build-and-test]
branches:
- master
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
env:
config: 'Release'
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
defaults:
run:
working-directory: src/FuncSharp
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration $config --no-restore
- name: Pack
run: dotnet pack -c $config -o out
- name: Publish packages
run: dotnet nuget push ./out/*.nupkg --skip-duplicate --source nuget.org --api-key ${{secrets.NUGET_TOKEN}}