-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 1.36 KB
/
publish-packages.yml
File metadata and controls
39 lines (31 loc) · 1.36 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
29
30
31
32
33
34
35
36
37
38
39
name: Publish NuGet Packages
on:
release:
types: [created]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0'
- name: Install .NET WASM workload
run: dotnet workload install wasm-tools
- name: Build and Pack
run: |
dotnet pack Mythetech.Framework/Mythetech.Framework.csproj -c Release -o ./nupkgs
dotnet pack Mythetech.Framework.WebAssembly/Mythetech.Framework.WebAssembly.csproj -c Release -o ./nupkgs
dotnet pack Mythetech.Framework.Desktop/Mythetech.Framework.Desktop.csproj -c Release -o ./nupkgs
- name: Publish to NuGet.org
run: dotnet nuget push ./nupkgs/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_ORG_API_KEY }} --skip-duplicate
- name: Publish to GitHub Packages
run: |
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github https://nuget.pkg.github.com/mythetech/index.json
dotnet nuget push ./nupkgs/*.nupkg --source github --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate