Release 3.3.0-beta.2 #34
Workflow file for this run
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 package | |
| on: | |
| release: | |
| types: [published] | |
| env: | |
| ARTIFACTS_FEED_URL: https://api.nuget.org/v3/index.json | |
| jobs: | |
| pack-and-publish: | |
| runs-on: ubuntu-22.04 # NuGet.exe is a Mono application on Linux and is not installed by default on `ubuntu-latest` runners | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Determine version for NuGet package | |
| run: echo NUGET_VERSION=${GITHUB_REF#refs/tags/v} >> $GITHUB_ENV | |
| - name: Replace version number in nuspec files | |
| run: 'sed -i -e "s/{{NuGetVersion}}/$NUGET_VERSION/g" *.nuspec' | |
| - name: Setup NuGet.exe for use with actions | |
| uses: NuGet/setup-nuget@v1.2.0 | |
| - name: Create main package | |
| run: nuget pack Neolution.CodeAnalysis.nuspec | |
| - name: Create TestsRuleset package | |
| run: nuget pack Neolution.CodeAnalysis.TestsRuleset.nuspec | |
| - name: Push all packages to Nuget.org | |
| run: dotnet nuget push --skip-duplicate -s $ARTIFACTS_FEED_URL -k $NUGET_AUTH_TOKEN **/*.nupkg | |
| env: | |
| NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY_NEOLUTION }} | |
| notify: | |
| needs: [pack-and-publish] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: neolution-ch/action-release-notifier@v1 | |
| with: | |
| slack-token: ${{ secrets.SLACK_RELEASE_NOTIFIER_TOKEN }} | |
| slack-channel-ids: ${{ vars.SLACK_CHANNEL_ID_RELEASE_ANNOUNCEMENTS }} | |
| ignore-alpha-releases: true | |
| ignore-rc-releases: true |