publish tool #23
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: 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: 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: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
global-json-file: /global.json | |
- name: Package | |
run: dotnet pack --configuration Release --output nuget --nologo -p:Version=${{ steps.version.outputs.nuGetVersionV2 }} | |
- name: Tag Repository | |
uses: rickstaa/action-create-tag@v1 | |
with: | |
tag: "v${{ steps.version.outputs.semVer }}" | |
- name: Publish | |
run: dotnet nuget push "**/*.nupkg" --source nuget.org --api-key ${{ secrets.NUGET_API_KEY }} |