Skip to content

Commit 11798a1

Browse files
committed
Add new workflow to push to nuget
1 parent 434de93 commit 11798a1

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/push.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PushToNuget
2+
env:
3+
NUGET_DIR: '${{ github.workspace }}/nuget'
4+
5+
on:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Pack Blazor.Diagrams.Core
15+
working-directory: src/Blazor.Diagrams.Core
16+
run: 'dotnet pack --configuration Release --output ${{ env.NUGET_DIR }}'
17+
18+
- name: Pack Blazor.Diagrams
19+
working-directory: src/Blazor.Diagrams
20+
run: 'dotnet pack --configuration Release --output ${{ env.NUGET_DIR }}'
21+
22+
- name: Pack Blazor.Diagrams.Algorithms
23+
working-directory: src/Blazor.Diagrams.Algorithms
24+
run: 'dotnet pack --configuration Release --output ${{ env.NUGET_DIR }}'
25+
26+
- name: Push
27+
run: |
28+
foreach($file in (Get-ChildItem "${{ env.NUGET_DIR }}" -Recurse -Include *.nupkg)) {
29+
dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
30+
}

Blazor.Diagrams.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2424
.github\workflows\build.yml = .github\workflows\build.yml
2525
CHANGELOG.md = CHANGELOG.md
2626
.github\workflows\main.yml = .github\workflows\main.yml
27+
.github\workflows\push.yml = .github\workflows\push.yml
2728
README.md = README.md
2829
EndProjectSection
2930
EndProject

0 commit comments

Comments
 (0)