test #25
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: Build | |
on: | |
- push | |
- pull_request | |
- workflow_dispatch | |
jobs: | |
Windows: | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # needed for Nerdbank.GitVersioning | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.0.x | |
- name: Create NuGet Package | |
run: dotnet pack | |
- name: Archive NuGet Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NuGet Package | |
path: src/Renci.SshNet/bin/Release/*.*nupkg | |
Publish: | |
runs-on: ubuntu-24.04 | |
permissions: | |
packages: write | |
needs: | |
- Windows | |
steps: | |
- name: Download NuGet Package | |
uses: actions/download-artifact@v4 | |
with: | |
name: NuGet Package | |
- name: Publish to GitHub NuGet Registry | |
run: | | |
dotnet nuget add source \ | |
--username mus65 \ | |
--password ${{ secrets.GITHUB_TOKEN }} \ | |
--store-password-in-clear-text \ | |
--name github \ | |
"https://nuget.pkg.github.com/mus65/index.json" | |
dotnet nuget push "*.nupkg" \ | |
--source github \ | |
--api-key ${{ secrets.GITHUB_TOKEN }} |