File tree Expand file tree Collapse file tree 3 files changed +47
-57
lines changed Expand file tree Collapse file tree 3 files changed +47
-57
lines changed Original file line number Diff line number Diff line change
1
+ name : ErabliereAPI.Proxy-Publish
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ paths-include :
8
+ - DirectNet.Net/**
9
+ - .github/workflows/directnet-nuget-publish.yaml
10
+ workflow_dispatch :
11
+
12
+ env :
13
+ name : PROJECT_PATH
14
+ value : DirectNet.Net/DirectNet.Net.csproj
15
+
16
+ jobs :
17
+ build :
18
+ runs-on : ubuntu-latest
19
+ steps :
20
+ - uses : actions/checkout@v2
21
+
22
+ - name : dotnet build
23
+ run : dotnet build $PROJECT_PATH -c Release -o bin/Release
24
+
25
+ - name : Push the package to nuget.org
26
+ run : |
27
+ # Extract the version from the csproj file
28
+ VERSION=$(grep -Eoi "<version>([[:digit:]\.]+)</version>" DirectNet.Net/DirectNet.Net.csproj | sed -n 's:.*<Version>\(.*\)</Version>.*:\1:p')
29
+
30
+ # Publish the package to nuget.org
31
+ dotnet nuget push ./bin/Release/DirectNet.Net.$VERSION.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.DirectNetAPIKey }}
Original file line number Diff line number Diff line change 4
4
<TargetFramework >net6.0</TargetFramework >
5
5
<ImplicitUsings >enable</ImplicitUsings >
6
6
<Nullable >enable</Nullable >
7
+ <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
8
+ </PropertyGroup >
9
+
10
+ <PropertyGroup >
11
+ <PackageId >DirectNet.Net</PackageId >
12
+ <Version >1.0.0</Version >
13
+ <Authors >Frédéric Jacques</Authors >
14
+ <Company >ErabliereAPI</Company >
15
+ <PackageTags >DirectNet;Automation Direct</PackageTags >
16
+ <Description >
17
+ DirectNet.Net is a package that allow to communicate on a serial port to a
18
+ automation direct PLC using the DirectNet protocol.
19
+ </Description >
20
+ <PackageLicenseExpression >MIT</PackageLicenseExpression >
21
+ <ProjectUrl >https://github.com/freddycoder/DirectNet.Net</ProjectUrl >
22
+ <Copyright >Copyright © ErabliereAPI 2022</Copyright >
7
23
</PropertyGroup >
8
24
9
25
<ItemGroup >
10
- <PackageReference Include =" ErabliereAPI.Proxy" Version =" 1.0.2" />
11
26
<PackageReference Include =" Microsoft.Extensions.Logging.Abstractions" Version =" 6.0.1" />
12
27
<PackageReference Include =" Microsoft.Windows.Compatibility" Version =" 6.0.0" />
13
28
</ItemGroup >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments