Skip to content

Add nuget source

Add nuget source #13

Workflow file for this run

name: release
on:
push:
tags:
- 'v*' # This triggers the action on new version tags
jobs:
build-and-test:
uses: ./.github/workflows/build.yml
release:
runs-on: ubuntu-latest
needs: build-and-test
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Set version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Pack .NET tool
run: dotnet pack ./Dotty.CLI/Dotty.CLI.csproj --configuration Release -p:Version=${{ env.VERSION }} --output ./out --no-restore
- name: Publish to NuGet
run: dotnet nuget push ./out/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json