Skip to content

Commit b5e9751

Browse files
committed
wip
1 parent dd9c5f3 commit b5e9751

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ jobs:
2828
env:
2929
VERSION: ${{ secrets.VERSION }}
3030
run: ./build.sh
31-
- if: matrix.runs-on == 'ubuntu-latest' && secrets.MYGET_ADAMRALPH_CI_API_KEY != ''
32-
run: ./push.sh ${{ secrets.MYGET_ADAMRALPH_CI_API_KEY }}
31+
- if: matrix.runs-on == 'ubuntu-latest'
32+
env:
33+
MYGET_ADAMRALPH_CI_API_KEY: ${{ secrets.MYGET_ADAMRALPH_CI_API_KEY }}
34+
run: ./push.sh

push.sh

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

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

0 commit comments

Comments
 (0)