forked from plotly/Plotly.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (75 loc) · 3.17 KB
/
push-prerelease.yml
File metadata and controls
86 lines (75 loc) · 3.17 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: 'Upload last-dev versions to MyGet'
on:
push:
branches:
- dev
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Setup .NET 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.301' # I highly recommend fixing a version
include-prerelease: true
- uses: actions/checkout@v3
- name: 'Add myget as source'
run: |
cd src
dotnet new nugetconfig
dotnet nuget add source https://www.myget.org/F/plotly-net-nightly/api/v3/index.json --name myget
- name: 'Push packages'
run: |
# versioning
commithash=$(git rev-parse --short HEAD)
currtime=$(date +%s)
echo "commit hash is $commithash"
echo "time is $currtime"
name=11.0.0-dev-$currtime-$commithash
echo "name is $name"
chmod +x build.sh
./build.sh
cd src
# Plotly.NET
cd ./Plotly.NET
dotnet restore Plotly.NET.fsproj
dotnet build Plotly.NET.fsproj -c release
dotnet pack Plotly.NET.fsproj -c release -p:PackageVersion=$name
cd bin/release
dotnet nuget push Plotly.NET.$name.nupkg --api-key ${{ secrets.MYGET_KEY }} --source "myget"
cd ../../..
echo 'Pushed Plotly.NET!'
# Plotly.NET.Interactive
cd ./Plotly.NET.Interactive
dotnet remove package Plotly.NET
dotnet add reference ../Plotly.NET/Plotly.NET.fsproj
dotnet restore Plotly.NET.Interactive.fsproj
dotnet build Plotly.NET.Interactive.fsproj -c release
dotnet pack Plotly.NET.Interactive.fsproj -c release -p:PackageVersion=$name
cd bin/release
dotnet nuget push Plotly.NET.Interactive.$name.nupkg --api-key ${{ secrets.MYGET_KEY }} --source "myget"
cd ../../..
echo 'Pushed Plotly.NET.Interactive!'
# Plotly.NET.ImageExport
cd ./Plotly.NET.ImageExport
dotnet remove package Plotly.NET
dotnet add reference ../Plotly.NET/Plotly.NET.fsproj
dotnet restore Plotly.NET.ImageExport.fsproj
dotnet build Plotly.NET.ImageExport.fsproj -c release
dotnet pack Plotly.NET.ImageExport.fsproj -c release -p:PackageVersion=$name
cd bin/release
dotnet nuget push Plotly.NET.ImageExport.$name.nupkg --api-key ${{ secrets.MYGET_KEY }} --source "myget"
cd ../../..
echo 'Pushed Plotly.NET.ImageExport!'
# Plotly.NET.CSharp
cd ./Plotly.NET.CSharp
#the csharp version has static dependencies
#dotnet remove package Plotly.NET
#dotnet add reference ../Plotly.NET/Plotly.NET.fsproj
dotnet restore Plotly.NET.CSharp.csproj
dotnet build Plotly.NET.CSharp.csproj -c release
dotnet pack Plotly.NET.CSharp.csproj -c release -p:PackageVersion=$name
cd bin/release
dotnet nuget push Plotly.NET.CSharp.$name.nupkg --api-key ${{ secrets.MYGET_KEY }} --source "myget"
cd ../../..
echo 'Pushed Plotly.NET.CSharp!'