Skip to content

Commit 62467e0

Browse files
committed
workflow fix + changes
1 parent c9d8c57 commit 62467e0

1 file changed

Lines changed: 27 additions & 4 deletions

File tree

.github/workflows/build-test-publish.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ on:
66
branches:
77
- master
88

9+
permissions:
10+
contents: read
11+
packages: write
12+
13+
env:
14+
OWNER: "FModel"
15+
916
defaults:
1017
run:
1118
working-directory: src
@@ -30,17 +37,33 @@ jobs:
3037
# run: dotnet test -c Release --no-restore --no-build -v normal
3138

3239
- name: Pack NuGet Package(s)
33-
run: dotnet pack -c Release --no-restore --no-build --output .\nuget-packages
40+
run: dotnet pack -c Release --no-restore --no-build --output "$env:USERPROFILE\nuget-packages"
3441

3542
- name: Upload Build Artifact(s)
3643
uses: actions/upload-artifact@v4
3744
with:
3845
name: nuget-packages
39-
path: .\nuget-packages
46+
path: "$env:USERPROFILE\nuget-packages"
4047

41-
# - name: Push NuGet Package(s)
48+
# - name: Push NuGet Package(s) to nuget.org
4249
# run: |
43-
# dotnet nuget push .\nuget-packages\*.nupkg `
50+
# dotnet nuget push "$env:USERPROFILE\nuget-packages\*.nupkg" `
4451
# --source https://api.nuget.org/v3/index.json `
4552
# --api-key ${{ secrets.NUGET_API_KEY }} `
4653
# --skip-duplicate
54+
55+
# - name: Add GitHub Packages source
56+
# run: |
57+
# dotnet nuget add source `
58+
# --username ${{ github.actor }} `
59+
# --password ${{ secrets.GITHUB_TOKEN }} `
60+
# --store-password-in-clear-text `
61+
# --name github `
62+
# "https://nuget.pkg.github.com/${{ env.OWNER }}/index.json"
63+
64+
# - name: Push NuGet Package(s) to GitHub
65+
# run: |
66+
# dotnet nuget push "$env:USERPROFILE\nuget-packages\*.nupkg" `
67+
# --source github `
68+
# --api-key ${{ secrets.GITHUB_TOKEN }} `
69+
# --skip-duplicate

0 commit comments

Comments
 (0)