Skip to content

Commit e4bd577

Browse files
Merge pull request #17 from ShawnLaMountain/SoureGenerator
Updating CD for Test Build
2 parents 5697c39 + c2a7ec4 commit e4bd577

File tree

5 files changed

+64
-14
lines changed

5 files changed

+64
-14
lines changed

.github/workflows/CD.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,30 @@ jobs:
4343

4444
- name: Restore NuGet packages.sln
4545
run: nuget restore ./src/${{ env.FILE_NAME}}.sln
46-
46+
47+
- name: Build Solution
48+
run: msbuild ./src/${{ env.FILE_NAME}}.sln /p:Configuration=Release
49+
50+
- name: Prepare .nuspec
51+
run: |
52+
$nuspec = Get-Content ThunderDesign.Net-PCL.nuspec.in
53+
$nuspec = $nuspec -replace '\$\{\{ env.FILE_NAME \}\}', '${{ env.FILE_NAME }}'
54+
$nuspec = $nuspec -replace '\$\{\{ env.TITLE \}\}', '${{ env.TITLE }}'
55+
$nuspec = $nuspec -replace '\$\{\{ env.DESCRIPTION \}\}', '${{ env.DESCRIPTION }}'
56+
$nuspec = $nuspec -replace '\$\{\{ env.TAGS \}\}', '${{ env.TAGS }}'
57+
$nuspec = $nuspec -replace '\$\{\{ env.GITHUB_URL \}\}', '${{ env.GITHUB_URL }}'
58+
$nuspec = $nuspec -replace '\$\{\{ env.REPOSITORY_URL \}\}', '${{ env.REPOSITORY_URL }}'
59+
Set-Content ThunderDesign.Net-PCL.nuspec $nuspec
60+
shell: pwsh
61+
4762
- name: Create NuGet Package
48-
run: msbuild ./src/${{ env.FILE_NAME}}.sln -t:pack /p:VersionPrefix=${{ github.event.release.tag_name }} /p:Configuration=Release /p:Title="${{ env.TITLE }}" /p:Description="${{ env.DESCRIPTION }}" /p:PackageTags="${{ env.TAGS }}" /p:Authors=ThunderDesign /p:PackageProjectUrl=${{ env.GITHUB_URL }} /p:PackageLicenseExpression=MIT /p:RepositoryType=git /p:RepositoryUrl=${{ env.REPOSITORY_URL }} /p:PackageReleaseNotes="See ${{ env.REPOSITORY_URL }}/releases/tag/${{ github.event.release.tag_name }}" /p:PackageOutputPath=${{ env.PACKAGE_OUTPUT_DIRECTORY}}
63+
run: nuget pack ThunderDesign.Net-PCL.nuspec -Version ${{ github.event.release.tag_name }} -OutputDirectory ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
4964

5065
- name: Archive NuGet Package
5166
uses: actions/upload-artifact@v2.3.1
5267
with:
5368
name: Package_${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}
5469
path: ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg
5570

56-
- name: Publish NuGet Package
57-
run: nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}
71+
# - name: Publish NuGet Package
72+
# run: nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}

samples/Xamarin/SimpleContacts/SimpleContacts.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThunderDesign.Net-PCL.Threa
1616
EndProject
1717
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThunderDesign.Net-PCL.SourceGenerators", "..\..\..\src\ThunderDesign.Net-PCL.SourceGenerators\ThunderDesign.Net-PCL.SourceGenerators.csproj", "{C0A3769B-4580-2360-A1DF-C2A16B56DBF2}"
1818
EndProject
19+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThunderDesign.Net-PCL.Threading.Shared", "..\..\..\src\ThunderDesign.Net-PCL.Threading.Shared\ThunderDesign.Net-PCL.Threading.Shared.csproj", "{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}"
20+
EndProject
1921
Global
2022
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2123
Debug|Any CPU = Debug|Any CPU
@@ -104,6 +106,18 @@ Global
104106
{C0A3769B-4580-2360-A1DF-C2A16B56DBF2}.Release|iPhone.Build.0 = Release|Any CPU
105107
{C0A3769B-4580-2360-A1DF-C2A16B56DBF2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
106108
{C0A3769B-4580-2360-A1DF-C2A16B56DBF2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
109+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
110+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Debug|Any CPU.Build.0 = Debug|Any CPU
111+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
112+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Debug|iPhone.Build.0 = Debug|Any CPU
113+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
114+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
115+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Release|Any CPU.ActiveCfg = Release|Any CPU
116+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Release|Any CPU.Build.0 = Release|Any CPU
117+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Release|iPhone.ActiveCfg = Release|Any CPU
118+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Release|iPhone.Build.0 = Release|Any CPU
119+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
120+
{B7155B3D-8A6E-CA50-5902-5AB2EBEDA57D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
107121
EndGlobalSection
108122
GlobalSection(SolutionProperties) = preSolution
109123
HideSolutionNode = FALSE
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
using ThunderDesign.Net_PCL.Threading.Attributes;
5+
6+
namespace SimpleContacts.Models
7+
{
8+
internal partial class TestModel
9+
{
10+
private void TestFirstName()
11+
{
12+
//this.FirstName
13+
}
14+
15+
[BindableProperty]
16+
string _firstName = "John";
17+
}
18+
}

samples/Xamarin/SimpleContacts/SimpleContacts/SimpleContacts.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFramework>netstandard2.1</TargetFramework>
55
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
66
<LangVersion>9.0</LangVersion>
77
</PropertyGroup>
@@ -16,6 +16,9 @@
1616

1717
<ItemGroup>
1818
<ProjectReference Include="..\..\..\..\src\ThunderDesign.Net-PCL.Threading\ThunderDesign.Net-PCL.Threading.csproj" />
19+
<ProjectReference Include="..\..\..\..\src\ThunderDesign.Net-PCL.SourceGenerators\ThunderDesign.Net-PCL.SourceGenerators.csproj"
20+
OutputItemType="Analyzer"
21+
ReferenceOutputAssembly="false" />
1922
</ItemGroup>
2023

2124
<ItemGroup>
@@ -31,7 +34,7 @@
3134
<None Include="$(TargetPath)" Pack="true" PackagePath="analyzers/dotnet/cs/" />
3235
</ItemGroup>
3336

34-
<ItemGroup>
37+
<!--<ItemGroup>
3538
<Analyzer Include="..\..\..\..\src\ThunderDesign.Net-PCL.SourceGenerators\bin\Debug\netstandard2.0\ThunderDesign.Net-PCL.SourceGenerators.dll" />
36-
</ItemGroup>
39+
</ItemGroup>-->
3740
</Project>

samples/Xamarin/SimpleContacts/SimpleContacts/ViewModels/TestModel.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88

99
namespace SimpleContacts.ViewModels
1010
{
11-
internal partial class TestModel : INotifyPropertyChanged
11+
internal partial class TestModel// : INotifyPropertyChanged
1212
{
13-
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
13+
//public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
1414
private void Test()
1515
{
16-
this.LastName = "John";
16+
//this.MiddleName = "John";
1717
}
1818

1919
//public void OnPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = "")
2020
//{
2121
// this.NotifyPropertyChanged(PropertyChanged, propertyName);
2222
//}
2323

24-
[BindableProperty(threadSafe:false,notify:false, alsoNotify: new string[] { "FullName" })]
25-
private string _FirstName = String.Empty;
24+
//[BindableProperty(threadSafe:false,notify:false, alsoNotify: new string[] { "FullName" })]
25+
//private string _FirstName = String.Empty;
2626

27-
[BindableProperty(alsoNotify: new string[] { "FullName" })]
28-
private string _lastName = String.Empty;
27+
//[BindableProperty(alsoNotify: new string[] { "FullName" })]
28+
//private string _lastName = String.Empty;
2929

3030
[Property(readOnly: true, threadSafe: false)]
3131
private string _MiddleName = String.Empty;

0 commit comments

Comments
 (0)