Skip to content

Commit 5bbec2f

Browse files
committed
Publish to GitHub package feed
1 parent df90803 commit 5bbec2f

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/dotnetcore.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ env:
55
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
66
# Disable sending usage data to Microsoft
77
DOTNET_CLI_TELEMETRY_OPTOUT: true
8-
# GitHub Packages Feed settings
9-
GITHUB_FEED: https://nuget.pkg.github.com/fsprojects
10-
GITHUB_USER: fsprojects
11-
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128

139
on:
1410
push:
@@ -41,7 +37,9 @@ jobs:
4137

4238
package:
4339
runs-on: windows-latest
44-
40+
permissions:
41+
packages: write
42+
contents: read
4543
steps:
4644
- uses: actions/checkout@v2
4745
- name: Setup .NET Core
@@ -74,13 +72,14 @@ jobs:
7472
with:
7573
name: nupkg
7674
path: ./bin/nupkg/*.nupkg
77-
#- name: Push to GitHub Feed
78-
# shell: bash
79-
# run: |
80-
# for f in ./bin/nupkg/*.nupkg
81-
# do
82-
# curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
83-
# done
75+
- name: Push to GitHub Feed
76+
shell: bash
77+
run: |
78+
for f in ./bin/nupkg/*.nupkg
79+
do
80+
echo $f
81+
dotnet nuget push $f -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
82+
done
8483
8584
docs:
8685
runs-on: windows-latest

0 commit comments

Comments
 (0)