Publish NuGet #14
This file contains hidden or 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: Publish NuGet | |
| on: | |
| release: | |
| types: | |
| - published | |
| push: | |
| tags: | |
| - v* | |
| workflow_dispatch: | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_VERSION: 9.0.101 | |
| NUGET_API_KEY: ${{ secrets.NUGET_KEY }} | |
| jobs: | |
| package: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up git-cliff | |
| uses: kenji-miyake/setup-git-cliff@v1 | |
| # workaround for https://github.com/actions/runner/issues/2033 | |
| - name: ownership workaround | |
| run: git config --global --add safe.directory '*' | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Publish nuget package | |
| run: dotnet fsi ./build.fsx target publish --nuget-api-key ${{ env.NUGET_API_KEY }} | |
| - name: Generate release notes | |
| run: dotnet fsi ./build.fsx target releasenotes | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |