mirror of
https://github.com/XFox111/SimpleOTP.git
synced 2026-04-22 08:00:45 +03:00
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: "Release workflow"
|
|
|
|
on:
|
|
release:
|
|
types: [ published ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: 10.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/nuget-push@v1.2.2
|
|
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
|