File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 28
28
29
29
- name : Build
30
30
run : |
31
+ # GH Actions puts us in detached head, but for nbgv, we need to be on the branch
31
32
if echo "${{github.ref}}" | grep -q "^refs/heads/"; then
32
33
git checkout "$(echo ${{github.ref}} | sed -E 's|^refs/heads/||')";
33
34
fi
39
40
name : nuget
40
41
path : bin/nuget
41
42
43
+ prerelease :
44
+ runs-on : ubuntu-latest
45
+ needs : build
46
+ if : ${{ github.ref == 'refs/heads/master' }}
47
+ steps :
48
+ - name : Setup dotnet
49
+ uses : actions/setup-dotnet@v1
50
+ with :
51
+ dotnet-version : ' 5.0.100'
52
+
53
+ - name : Download nupkg
54
+ uses : actions/download-artifact@v1
55
+ with :
56
+ name : nuget
57
+
58
+ - name : Push to GitHub feed
59
+ run : dotnet nuget push nuget/*.nupkg
60
+ --api-key "${{github.repository_owner}}:${{secrets.GITHUB_TOKEN}}"
61
+ --source "https://nuget.pkg.github.com/${{github.repository_owner}}/"
62
+ --skip-duplicate
63
+
42
64
release :
43
65
runs-on : ubuntu-latest
44
66
needs : build
Original file line number Diff line number Diff line change 24
24
file_glob : ' true'
25
25
file : ./*.nupkg
26
26
27
+ - name : Push to GitHub feed
28
+ run : dotnet nuget push *.nupkg
29
+ --api-key "${{github.repository_owner}}:${{secrets.GITHUB_TOKEN}}"
30
+ --source "https://nuget.pkg.github.com/${{github.repository_owner}}/"
31
+ --skip-duplicate
32
+
27
33
- name : Push to NuGet
28
34
run : dotnet nuget push *.nupkg
29
35
--api-key ${{secrets.NUGET_API_KEY}}
You can’t perform that action at this time.
0 commit comments