publish #15
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 | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.* | |
- name: Build Blazor template | |
run: dotnet build ./BlazorBffOpenIdConnect/ | |
- name: Create SemVer | |
uses: PaulHatch/[email protected] | |
id: version | |
with: | |
tag_prefix: "Release_" | |
major_pattern: "(MAJOR)" | |
minor_pattern: "(MINOR)" | |
version_format: "${major}.${minor}.${patch}" | |
- name: Pack | |
run: dotnet pack -o ./publish -p:PackageVersion=${{ steps.version.outputs.version }} | |
- name: Upload nupkg to github releases | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
body: "" | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./publish/* | |
release_name: Release ${{ steps.version.outputs.version }} | |
tag: Release_${{ steps.version.outputs.version }} | |
file_glob: true | |
overwrite: true | |
- name: Publish to nuget | |
run: dotnet nuget push ./publish/Blazor.BFF.OpenIDConnect.Template.${{ steps.version.outputs.version }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json |