Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
adamralph committed Dec 21, 2019
1 parent dd9c5f3 commit b5e9751
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ jobs:
env:
VERSION: ${{ secrets.VERSION }}
run: ./build.sh
- if: matrix.runs-on == 'ubuntu-latest' && secrets.MYGET_ADAMRALPH_CI_API_KEY != ''
run: ./push.sh ${{ secrets.MYGET_ADAMRALPH_CI_API_KEY }}
- if: matrix.runs-on == 'ubuntu-latest'
env:
MYGET_ADAMRALPH_CI_API_KEY: ${{ secrets.MYGET_ADAMRALPH_CI_API_KEY }}
run: ./push.sh
13 changes: 9 additions & 4 deletions push.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail

for package in $(find -name "*.nupkg" | grep "test" -v); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://www.myget.org/F/adamralph-ci/api/v2/package --api-key $1
done
if [[ -z "${MYGET_ADAMRALPH_CI_API_KEY}" ]]
then
echo "${0##*/}": MYGET_ADAMRALPH_CI_API_KEY is empty or not set. Skipped pushing package(s).
else
for package in $(find -name "*.nupkg" | grep "test" -v); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://www.myget.org/F/adamralph-ci/api/v2/package --api-key $1
done
fi

0 comments on commit b5e9751

Please sign in to comment.