Skip to content

Commit

Permalink
Add new workflow to push to nuget
Browse files Browse the repository at this point in the history
  • Loading branch information
zHaytam authored and Heathermcx committed Dec 10, 2023
1 parent f9a0ae1 commit 2b69a4e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PushToNuget
env:
NUGET_DIR: '${{ github.workspace }}/nuget'

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Pack Blazor.Diagrams.Core
working-directory: src/Blazor.Diagrams.Core
run: 'dotnet pack --configuration Release --output ${{ env.NUGET_DIR }}'

- name: Pack Blazor.Diagrams
working-directory: src/Blazor.Diagrams
run: 'dotnet pack --configuration Release --output ${{ env.NUGET_DIR }}'

- name: Pack Blazor.Diagrams.Algorithms
working-directory: src/Blazor.Diagrams.Algorithms
run: 'dotnet pack --configuration Release --output ${{ env.NUGET_DIR }}'

- name: Push
run: |
foreach($file in (Get-ChildItem "${{ env.NUGET_DIR }}" -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
}
1 change: 1 addition & 0 deletions Blazor.Diagrams.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.github\workflows\build.yml = .github\workflows\build.yml
CHANGELOG.md = CHANGELOG.md
.github\workflows\main.yml = .github\workflows\main.yml
.github\workflows\push.yml = .github\workflows\push.yml
README.md = README.md
EndProjectSection
EndProject
Expand Down

0 comments on commit 2b69a4e

Please sign in to comment.