forked from HNIdesu/RubyMarshal
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (42 loc) · 1.62 KB
/
dotnet-desktop.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: .NET
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore ./RmSharp/RmSharp.csproj
- name: Build
run: dotnet build --configuration Release --no-restore ./RmSharp/RmSharp.csproj
# Comment out the Test step if it's causing issues
#- name: Test
# run: dotnet test --no-build --verbosity normal ./RmSharp.Tests/RmSharp.Tests.csproj
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore ./RmSharp/RmSharp.csproj
- name: Build
run: dotnet build --configuration Release --no-restore ./RmSharp/RmSharp.csproj
- name: Pack NuGet package
run: dotnet pack --configuration Release --no-build --output ./nupkg ./RmSharp/RmSharp.csproj
- name: Publish NuGet package to GitHub Packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
- name: Publish NuGet package to nuget.org
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push ./nupkg/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json