Skip to content

Remove adding nuget package to github release #21

Remove adding nuget package to github release

Remove adding nuget package to github release #21

Workflow file for this run

name: release
on:
push:
branches:
- main
paths:
- 'src/**'
- '!src/.editorconfig'
jobs:
build-extension:
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
RepositoryUrl: 'https://github.com/${{ github.repository }}'
RepositoryBranch: '${{ github.ref }}'
SourceRevisionId: '${{ github.sha }}'
Configuration: Release
SolutionPath: src\NScenario.sln
Deterministic: true
PackageReleaseNotes: 'https://github.com/${{ github.repository }}/releases'
ContinuousIntegrationBuild: true
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core 8
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0'
- name: Calculate next version
uses: cezarypiatek/NextVersionGeneratorAction@0.4
with:
minor-pattern: '.*'
major-pattern: 'BREAKING CHANGES'
output-to-env-variable: 'Version'
- name: Materialize Signing Key
id: write_sign_key_file
uses: timheuer/base64-to-file@v1
with:
fileName: 'Key.snk'
encodedString: ${{ secrets.SIGNING_KEY }}
- name: Restore dependencies
run: |
dotnet nuget locals all --clear
dotnet restore $env:SolutionPath
- name: Build extension
run: dotnet build $env:SolutionPath
env:
SignAssembly: true
AssemblyOriginatorKeyFile: ${{ steps.write_sign_key_file.outputs.filePath }}
- name: Generate release note
run: |
git fetch --prune
$commitLog = git log "$(git describe --tags --abbrev=0)..HEAD" --pretty=format:"- %s"
$commitLog = if([string]::IsNullOrWhitespace($commitLog)){git log --pretty=format:"- %s"}else{$commitLog}
"What's new: `r`n`r`n$([string]::Join("`r`n",$commitLog))" | Out-File release_note.md -Encoding utf8
- name: Create Github Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.Version }}
release_name: ${{ env.Version }}
body_path: release_note.md
draft: false
prerelease: false
- name: Publish extension to Nuget
run: |
dotnet nuget push src\NScenario\bin\Release\NScenario.${{ env.Version }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json