mirror of
https://github.com/ZetaKebab/MpcNET.git
synced 2025-07-03 17:17:36 +00:00
Add workflow to upload to nuget.org on release + add some examples to README
This commit is contained in:
39
.github/workflows/release.yml
vendored
Normal file
39
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
name: New Version Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
env:
|
||||
Solution_Name: MpcNET
|
||||
Configuration: Release
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||
- name: Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
|
||||
# Restore the application
|
||||
- name: Restore the application
|
||||
working-directory: ./Sources
|
||||
run: |
|
||||
msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
|
||||
|
||||
# Build package and upload to github packages
|
||||
- name: Build package
|
||||
working-directory: ./Sources
|
||||
run: |
|
||||
dotnet build $env:Solution_Name --configuration $env:Configuration
|
||||
dotnet pack --configuration $env:Configuration -o ./
|
||||
dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_API }} --source "nuget.org"
|
Reference in New Issue
Block a user