Merge pull request #158 from signnow/hotfix/document-history #17
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: Create Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
COREHOST_TRACE: false | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 # Disable sending usage data to Microsoft | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 # prevent the caching of the packages on the build machine | |
DOTNET_NOLOGO: true # removes logo and telemetry message from first run of dotnet cli | |
NUGET_XMLDOC_MODE: skip # prevent the download of the XML documentation for the packages | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET 5 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
3.1.x | |
5.0.x | |
- name: Setup Nuget Cache | |
uses: actions/cache@v3 | |
id: nuget-cache | |
with: | |
path: ~/.nuget | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: ${{ runner.os }}-nuget- | |
- name: Setup dotnet tool | |
env: | |
DOTNET_ROOT: ${{ runner.tool_cache }}/dncs/${{ matrix.dotnet }}/x64 | |
run: | | |
dotnet tool install --global InheritDocTool | |
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH | |
- name: Restore Nuget packages | |
run: dotnet restore -v:n | |
- name: Prepare Release Assets | |
id: get-version | |
run: | | |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
.github/release-notes.sh CHANGELOG.md > release-notes.txt | |
- name: Creates Nuget package | |
shell: pwsh | |
run: dotnet pack --configuration Release --output ./SignNow.Net/bin/Publish SignNow.Net | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: signNow .Net SDK v${{ steps.get-version.outputs.VERSION }} | |
tag: ${{ steps.get-version.outputs.VERSION }} | |
bodyFile: ${{ github.workspace }}/release-notes.txt | |
allowUpdates: true | |
artifacts: ${{ github.workspace }}/SignNow.Net/bin/Publish/*.nupkg | |
artifactContentType: application/octet-stream | |
- name: Publish Nuget Package | |
working-directory: ${{ github.workspace }}/SignNow.Net/bin/Publish | |
run: | | |
dotnet nuget push SignNow.Net.${{ steps.get-version.outputs.VERSION }}.nupkg \ | |
-k ${{ secrets.NUGET_TOKEN }} \ | |
-s https://api.nuget.org/v3/index.json |