-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (33 loc) · 894 Bytes
/
Copy pathbuild.yml
File metadata and controls
41 lines (33 loc) · 894 Bytes
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
name: Build
on:
push:
branches:
- master
- main
pull_request:
branches:
- "*"
release:
types: [created]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
shell: pwsh
run: ./build.ps1
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: dotnet-tool-pacakge
path: publish/packages/*.nupkg
retention-days: 1
- name: Publish to nuget
if: ${{ github.event_name == 'release' }}
shell: pwsh
run: |
dotnet nuget push 'publish/packages/*.nupkg' --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate