Skip to content

Commit 4e87bf2

Browse files
add nightly builds on myget (#315)
* Create push-prerelease.yml * Update push-prerelease.yml * Update push-prerelease.yml * Update push-prerelease.yml * Update push-prerelease.yml * Update push-prerelease.yml * Update push-prerelease.yml * Update README.md * Update README.md * Update README.md Co-authored-by: WhiteBlackGoose <[email protected]>
1 parent f3fc590 commit 4e87bf2

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

.github/workflows/push-prerelease.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: 'Upload last-dev versions to MyGet'
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
main:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Setup .NET 6
13+
uses: actions/setup-dotnet@v1
14+
with:
15+
dotnet-version: '6.0.301' # I highly recommend fixing a version
16+
include-prerelease: true
17+
18+
- uses: actions/checkout@v2
19+
20+
- name: 'Add myget as source'
21+
run: |
22+
cd src
23+
dotnet new nugetconfig
24+
dotnet nuget add source https://www.myget.org/F/plotly-net-nightly/api/v3/index.json --name myget
25+
26+
- name: 'Push packages'
27+
run: |
28+
# versioning
29+
commithash=$(git rev-parse --short HEAD)
30+
currtime=$(date +%s)
31+
echo "commit hash is $commithash"
32+
echo "time is $currtime"
33+
name=11.0.0-dev-$currtime-$commithash
34+
echo "name is $name"
35+
36+
chmod +x build.sh
37+
./build.sh
38+
39+
cd src
40+
41+
# Plotly.NET
42+
cd ./Plotly.NET
43+
dotnet restore Plotly.NET.fsproj
44+
dotnet build Plotly.NET.fsproj -c release
45+
dotnet pack Plotly.NET.fsproj -c release -p:PackageVersion=$name
46+
cd bin/release
47+
dotnet nuget push Plotly.NET.$name.nupkg --api-key ${{ secrets.MYGET_KEY }} --source "myget"
48+
cd ../../..
49+
echo 'Pushed Plotly.NET!'
50+
51+
# Plotly.NET.Interactive
52+
cd ./Plotly.NET.Interactive
53+
dotnet remove package Plotly.NET
54+
dotnet add reference ../Plotly.NET/Plotly.NET.fsproj
55+
dotnet restore Plotly.NET.Interactive.fsproj
56+
dotnet build Plotly.NET.Interactive.fsproj -c release
57+
dotnet pack Plotly.NET.Interactive.fsproj -c release -p:PackageVersion=$name
58+
cd bin/release
59+
dotnet nuget push Plotly.NET.Interactive.$name.nupkg --api-key ${{ secrets.MYGET_KEY }} --source "myget"
60+
cd ../../..
61+
echo 'Pushed Plotly.NET.Interactive!'
62+
63+
# Plotly.NET.ImageExport
64+
cd ./Plotly.NET.ImageExport
65+
dotnet remove package Plotly.NET
66+
dotnet add reference ../Plotly.NET/Plotly.NET.fsproj
67+
dotnet restore Plotly.NET.ImageExport.fsproj
68+
dotnet build Plotly.NET.ImageExport.fsproj -c release
69+
dotnet pack Plotly.NET.ImageExport.fsproj -c release -p:PackageVersion=$name
70+
cd bin/release
71+
dotnet nuget push Plotly.NET.ImageExport.$name.nupkg --api-key ${{ secrets.MYGET_KEY }} --source "myget"
72+
cd ../../..
73+
echo 'Pushed Plotly.NET.ImageExport!'
74+
75+
# Plotly.NET.CSharp
76+
cd ./Plotly.NET.CSharp
77+
dotnet remove package Plotly.NET
78+
dotnet add reference ../Plotly.NET/Plotly.NET.fsproj
79+
dotnet restore Plotly.NET.CSharp.csproj
80+
dotnet build Plotly.NET.CSharp.csproj -c release
81+
dotnet pack Plotly.NET.CSharp.csproj -c release -p:PackageVersion=$name
82+
cd bin/release
83+
dotnet nuget push Plotly.NET.CSharp.$name.nupkg --api-key ${{ secrets.MYGET_KEY }} --source "myget"
84+
cd ../../..
85+
echo 'Pushed Plotly.NET.CSharp!'

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Plotly.NET provides functions for generating and rendering plotly.js charts in *
1818
- [For applications and libraries](#for-applications-and-libraries)
1919
- [For scripting](#for-scripting)
2020
- [For dotnet interactive notebooks](#for-dotnet-interactive-notebooks)
21+
- [Nightly builds](#getting-nightly-builds)
2122
- [Documentation](#documentation)
2223
- [Getting started](#getting-started)
2324
- [Full library reference](#full-library-reference)
@@ -57,6 +58,7 @@ Or add the package reference directly to your `.*proj` file:
5758
<PackageReference Include="Plotly.NET" Version="<version>" />
5859
```
5960

61+
6062
### For scripting
6163

6264
You can include the package via an inline package reference:
@@ -75,6 +77,25 @@ the interactive extensions for dotnet interactive have you covered for seamless
7577
#r "nuget: Plotly.NET.Interactive, <version>"
7678
```
7779

80+
<details><summary><h3>Getting nightly builds</h3><sub>[click 🖱️]</sub></summary>
81+
82+
The nightly builds are located on myget.org.
83+
84+
For your project:
85+
```
86+
dotnet new nugetconfig
87+
dotnet nuget add source https://www.myget.org/F/plotly-net-nightly/api/v3/index.json
88+
dotnet add package Plotly.NET --prerelease
89+
```
90+
91+
Interactively:
92+
```
93+
#i "https://www.myget.org/F/plotly-net-nightly/api/v3/index.json"
94+
#r "nuget:Plotly.NET.Interactive, *-*"
95+
```
96+
97+
</details>
98+
7899
# Documentation
79100

80101
## Getting started

0 commit comments

Comments
 (0)