Make sure the top-level README.md file is included in the package #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |