Skip to content

Commit

Permalink
Updated publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gonace committed Jul 11, 2023
1 parent 7fd4b02 commit 65ea7a4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 23 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish
name: Publish

on:
workflow_dispatch: {}
Expand Down Expand Up @@ -29,19 +29,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build Intercom/Intercom.csproj --no-restore --configuration Release
- name: Publish
uses: laget-se/publish-nuget@v2.7.2
with:
INCLUDE_SYMBOLS: true
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
NUSPEC_FILE: Intercom.nuspec
PROJECT_FILE_PATH: Intercom/Intercom.csproj
VERSION_STATIC: "0.1.${{github.run_number}}-alpha"
- run: dotnet build --configuration Release Payment.System.Sdk/Payment.System.Sdk.csproj
- run: dotnet pack --configuration Release Payment.System.Sdk/Payment.System.Sdk.csproj -p:Version=0.1.${{github.run_number}}-alpha -p:PackageVersion=0.1.${{github.run_number}}-alpha -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:NuspecFile=Payment.System.Sdk.nuspec
- run: dotnet nuget push Payment.System.Sdk\bin\Release\laget.Payment.System.Sdk.%system.build.number%-alpha.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
7.0.x
6.0.x
3.1.x
- name: Restore dependencies
Expand Down
7 changes: 4 additions & 3 deletions Intercom.Tests/Intercom.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
<PropertyGroup>
<!--
Test all target frameworks from Cronitor/Cronitor.csproj
- net48 -> netstandard2.0
- netcoreapp3.1 -> netstandard2.1
- net7.0 -> net7.0
- net6.0 -> net6.0
- netcoreapp3.1 -> netstandard2.1
- net48 -> netstandard2.0
-->
<TargetFrameworks>net48;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netcoreapp3.1;net48</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Intercom/Intercom.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.1;netstandard2.0</TargetFrameworks>
<NuspecProperties>version=$(Version)</NuspecProperties>
</PropertyGroup>

Expand Down
13 changes: 9 additions & 4 deletions Intercom/Intercom.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@
<readme>assets\README.md</readme>
<repository type="git" url="https://github.com/gonace/Intercom" branch="master" />
<dependencies>
<group targetFramework="netstandard2.0">
<group targetFramework="net7.0">
<dependency id="Microsoft.CSharp" version="4.7.0" />
<dependency id="Newtonsoft.Json" version="13.0.2" />
</group>
<group targetFramework="net6.0">
<dependency id="Microsoft.CSharp" version="4.7.0" />
<dependency id="Newtonsoft.Json" version="13.0.2" />
</group>
<group targetFramework="netstandard2.1">
<dependency id="Microsoft.CSharp" version="4.7.0" />
<dependency id="Newtonsoft.Json" version="13.0.2" />
</group>
<group targetFramework="net6.0">
<group targetFramework="netstandard2.0">
<dependency id="Microsoft.CSharp" version="4.7.0" />
<dependency id="Newtonsoft.Json" version="13.0.2" />
</group>
Expand All @@ -32,8 +36,9 @@
<files>
<file src="..\README.md" target="assets\" />
<file src="..\assets\icon.png" target="assets\" />
<file src=".\bin\Release\netstandard2.0\*" target="lib\netstandard2.0\" />
<file src=".\bin\Release\netstandard2.1\*" target="lib\netstandard2.1\" />
<file src=".\bin\Release\net7.0\*" target="lib\net7.0\" />
<file src=".\bin\Release\net6.0\*" target="lib\net6.0\" />
<file src=".\bin\Release\netstandard2.1\*" target="lib\netstandard2.1\" />
<file src=".\bin\Release\netstandard2.0\*" target="lib\netstandard2.0\" />
</files>
</package>

0 comments on commit 65ea7a4

Please sign in to comment.