-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (27 loc) · 1.07 KB
/
Copy pathrelease.yml
File metadata and controls
28 lines (27 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Publish to NuGet
on:
release:
types: [created]
jobs:
publish:
#if: ${{ false }} # disable for now
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
- name: Select .NET Version
uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0.x'
- name: Pack
run: dotnet pack --configuration Release DotnetTestSplit/DotnetTestSplit.csproj
#- name: Push to GitHub packages
# run: |
# dotnet nuget add source --username javiertuya --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/javiertuya/index.json"
# dotnet nuget push DotnetTestSplit/nupkg/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push to nuget.org
run: dotnet nuget push DotnetTestSplit/nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source "https://api.nuget.org/v3/index.json"