Release workflow #2
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: "Release workflow" | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- run: dotnet restore | |
- run: dotnet pack | |
- name: Drop SimpleOTP | |
uses: actions/upload-artifact@main | |
with: | |
name: SimpleOTP | |
path: libraries/SimpleOTP/bin/Release/EugeneFox.SimpleOTP*.*nupkg | |
- name: Drop SimpleOTP.DependencyInjection | |
uses: actions/upload-artifact@main | |
with: | |
name: SimpleOTP.DependencyInjection | |
path: libraries/SimpleOTP.DependencyInjection/bin/Release/EugeneFox.SimpleOTP.DependencyInjection*.*nupkg | |
publish-nuget: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@main | |
with: | |
merge-multiple: true | |
- name: Publish NuGet and symbols | |
uses: edumserrano/[email protected] | |
with: | |
api-key: ${{ secrets.NUGET_API_KEY }} | |
working-directory: . | |
publish-github: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@main | |
with: | |
merge-multiple: true | |
- name: dotnet nuget push | |
run: dotnet nuget push *.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/xfox111/index.json --skip-duplicate --no-symbols |