-
Notifications
You must be signed in to change notification settings - Fork 37
44 lines (40 loc) · 1.6 KB
/
dotnetcore.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
43
44
name: prerelease NuGet
on: [push]
jobs:
build:
runs-on: ubuntu-latest
# also works with windows-latest and macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
- name: Build with dotnet and create prerelease nupkg
run: dotnet build --configuration PreRelease --version-suffix prerelease-$(date +%Y%m%d%H%M%S)
shell: bash
# run: dotnet build --configuration Release --version-suffix prerelease-$(Get-Date -Format "yyyyMMddHHmmss")
#- name: Install NuGet client
# uses: warrenbuckley/Setup-Nuget@v1
#- name: Setup nuget config # use .NuGet.config for now 2/2 GH bug https://github.com/NuGet/Home/issues/8580
# run: sed 's/GHPackagesToken/${{ secrets.GHPackagesToken }}/g' .nuget.config > nuget.config
#- name: Add GitHub Packages source to NuGet
# run: nuget sources add -name "GitHubPackages" -Source https://nuget.pkg.github.com/vslee/index.json -Username vslee -Password ${{ secrets.GHPackagesToken }}
#- name: list dir
# run: |
# dir
# cd IEXSharp
# dir
# cd bin
# dir
# cd Release
# dir
- name: Publish nuget to GitHub Packages
run: |
for f in ./IEXSharp/bin/PreRelease/*.nupkg
do
curl -vX PUT -u "vslee:${{ secrets.GHPackagesToken }}" -F package=@$f https://nuget.pkg.github.com/vslee/
done
shell: bash
# run: dotnet nuget push .\IEXSharp\bin\PreRelease\*.nupkg -s "GitHubPackages"