Skip to content

publish tool

publish tool #32

Workflow file for this run

name: publish tool
on:
workflow_dispatch:
jobs:
publish_tool:
name: Publish Tool
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Determine Version
id: version
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
- name: Package
run: dotnet pack --configuration Release --output nuget --nologo -p:Version=${{ steps.version.outputs.nuGetVersionV2 }}
- name: Generate Release Notes
run: |-
dotnet tool install --global ConventionalChangelog --version 0.7.0
changelog "${{ github.workspace }}" >> "changelog.md"
- name: Create a Release
uses: comnoco/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ steps.version.outputs.semVer }}"
release_name: "${{ steps.version.outputs.semVer }}"
body_path: "changelog.md"
draft: true
prerelease: ${{ steps.version.outputs.preReleaseLabel != '' }}
# - name: Publish
# run: dotnet nuget push "**/*.nupkg" --source nuget.org --api-key ${{ secrets.NUGET_API_KEY }}