-
Notifications
You must be signed in to change notification settings - Fork 32
42 lines (35 loc) · 1.36 KB
/
publish.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
name: publish to nuget
on:
create: # when tags are created
push:
branches:
- master # Default release branch, may also be named 'master' or 'develop'
jobs:
windows_latest:
name: build, pack & publish
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ClickableTransparentOverlay
- name: Build Project
run: dotnet build -c Release --no-restore ClickableTransparentOverlay
- name: Packages Project
run: dotnet pack ClickableTransparentOverlay/ClickableTransparentOverlay.csproj -c Release --no-restore --no-build
- name: Publish to nuget.org
if: startsWith(github.ref, 'refs/tags/')
run: dotnet nuget push ClickableTransparentOverlay\bin\Release\* -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}
- name: Build Demo for Github
run: |
dotnet build -c Release Examples/MultiThreadedOverlay
tar -a -v -c -f demo.zip Examples\MultiThreadedOverlay\bin\Release
- name: Upload Demo on Github
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: demo.zip