-
Notifications
You must be signed in to change notification settings - Fork 1.6k
42 lines (36 loc) · 1.24 KB
/
myget-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: A MyGet Publish
on: workflow_dispatch
jobs:
myget-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.100'
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: pre-release-pack.yml
# workflow_conclusion: success
name: ServiceStack Packages
commit: ${{ github.sha }}
path: ./build/staging
- name: Check output
working-directory: ./build
run: |
cd staging
export number_of_packages=$(ls -1 | wc -l)
echo "number_of_packages=${number_of_packages}" >> $GITHUB_ENV
- name: Push to MyGet
working-directory: ./build/staging
run: |
# Check if more than 73 packages
if [[ ${number_of_packages} -gt 73 ]]; then
echo "Pushing to MyGet"
dotnet nuget push '*.nupkg' -s 'https://www.myget.org/F/servicestack/api/v2/package' -k '${{ secrets.MYGET_APIKEY }}' --skip-duplicate
else
echo 'Less files than expected, skipping push'
exit 1
fi