Skip to content

Commit 43e8201

Browse files
committed
move publish step to main workflow
1 parent 94f9cb7 commit 43e8201

File tree

2 files changed

+7
-30
lines changed

2 files changed

+7
-30
lines changed

.github/workflows/branches-ubuntu.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -68,26 +68,3 @@ jobs:
6868
run: jq -r 'to_entries|map("::set-env name=GitVersion_\(.key)::\(.value|tostring)")|.[]' gitversion.json
6969
- name: Run tests
7070
run: echo "Current version is \"$GitVersion_SemVer\"" && dotnet test -c Release
71-
72-
publish:
73-
name: Publish
74-
needs: [test]
75-
runs-on: ubuntu-latest
76-
steps:
77-
- name: Checkout
78-
uses: actions/checkout@v2
79-
- name: Download nuget packages
80-
uses: actions/download-artifact@v1
81-
with:
82-
name: nupkg
83-
- uses: actions/setup-dotnet@v1
84-
with:
85-
source-url: https://nuget.pkg.github.com/graphql-dotnet/index.json
86-
env:
87-
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
88-
- name: Publish the package to GPR
89-
run: |
90-
for f in ./nupkg/*.nupkg
91-
do
92-
curl -vX PUT -u "graphql-dotnet:${{secrets.GITHUB_TOKEN}}" -F package=@$f https://nuget.pkg.github.com/graphql-dotnet/
93-
done

.github/workflows/main-ubuntu.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ jobs:
8383
uses: actions/download-artifact@v1
8484
with:
8585
name: nupkg
86-
- uses: actions/setup-dotnet@v1
87-
with:
88-
source-url: https://nuget.pkg.github.com/graphql-dotnet/index.json
89-
env:
90-
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
91-
- name: Publish the package to GPR
92-
run: for p in ./nupkg/*.nupkg; do dotnet nuget push $p -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate; done
86+
- name: Publish the package to GPR
87+
# using workaround with CURL because of non-functioning upload via dotnet nuget (https://stackoverflow.com/a/58943251)
88+
run: |
89+
for f in ./nupkg/*.nupkg
90+
do
91+
curl -vX PUT -u "graphql-dotnet:${{secrets.GITHUB_TOKEN}}" -F package=@$f https://nuget.pkg.github.com/graphql-dotnet/
92+
done

0 commit comments

Comments
 (0)