-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (43 loc) · 3.22 KB
/
dotnet-prerelease.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
45
46
47
name: .NET Prerelease
on:
push:
tags:
- '[0-9]+\.[0-9]+\.[0-9]+\-beta'
jobs:
build:
runs-on: windows-latest
steps:
- name: Print Tag Name
run: echo "Creating release for Tag $(basename ${{ github.ref }})"
- name: Set Version variable
id: version
run: echo "::set-output name=PRODUCT_VERSION::$(basename ${{ github.ref }})"
- uses: actions/checkout@v3
- name: Setup .NET6
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Setup .NET8
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore SmartIOT.Connector.sln
- name: Build
run: dotnet build -c Release --no-restore SmartIOT.Connector.sln
- name: Test
run: dotnet test -c Release --no-build --verbosity normal SmartIOT.Connector.sln
- name: Pack
run: dotnet pack -c Release /p:version=${{ steps.version.outputs.PRODUCT_VERSION }} SmartIOT.Connector.sln
- name: NugetPublish
run: |
dotnet nuget push Connectors\SmartIOT.Connector.Mqtt\bin\Release\SmartIOT.Connector.Mqtt.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
dotnet nuget push Connectors\SmartIOT.Connector.Tcp\bin\Release\SmartIOT.Connector.Tcp.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
dotnet nuget push Core\SmartIOT.Connector.DependencyInjection\bin\Release\SmartIOT.Connector.DependencyInjection.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
dotnet nuget push Core\SmartIOT.Connector.Messages\bin\Release\SmartIOT.Connector.Messages.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
dotnet nuget push Core\SmartIOT.Connector.Prometheus\bin\Release\SmartIOT.Connector.Prometheus.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
dotnet nuget push Core\SmartIOT.Connector.Core\bin\Release\SmartIOT.Connector.Core.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
dotnet nuget push Core\SmartIOT.Connector.RestApi\bin\Release\SmartIOT.Connector.RestApi.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
dotnet nuget push Devices\SmartIOT.Connector.Plc.S7Net\bin\Release\SmartIOT.Connector.Plc.S7Net.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
dotnet nuget push Devices\SmartIOT.Connector.Plc.Snap7\bin\Release\SmartIOT.Connector.Plc.Snap7.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
dotnet nuget push Devices\SmartIOT.Connector.Plc.SnapModbus\bin\Release\SmartIOT.Connector.Plc.SnapModbus.${{ steps.version.outputs.PRODUCT_VERSION }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}