Skip to content

Commit 7625ad2

Browse files
authored
Template 3 (#17)
* Fix up of github action * More github action * Fixing the release/debug flag * Fix for NU5128 warning
1 parent 3e2f31f commit 7625ad2

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.github/workflows/build-library.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Build and Test Library
33
on:
44
push:
55
branches: [ main ]
6-
paths: [ 'src/**', 'tests/**', 'Datasync Solution.sln' ]
6+
paths: [ 'src/**', 'tests/**', 'Datasync Solution.sln', '.github/workflows/build-library.yml', '.github/workflows/SignedPackageFileList.txt' ]
77
pull_request:
88
branches: [ main ]
9-
paths: [ 'src/**', 'tests/**', 'Datasync Solution.sln' ]
9+
paths: [ 'src/**', 'tests/**', 'Datasync Solution.sln', '.github/workflows/build-library.yml', '.github/workflows/SignedPackageFileList.txt' ]
1010
release:
1111
types: [ published ]
1212
workflow_dispatch:

.github/workflows/build-template.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Build Templates
33
on:
44
push:
55
branches: [ main ]
6-
paths: [ 'templates/**' ]
6+
paths: [ 'templates/**', '.github/workflows/build-template.yml', '.github/workflows/SignedTemplateFileList.txt' ]
77
pull_request:
88
branches: [ main ]
9-
paths: [ 'templates/**' ]
9+
paths: [ 'templates/**', '.github/workflows/build-template.yml', '.github/workflows/SignedTemplateFileList.txt' ]
1010
release:
1111
types: [ published ]
1212
workflow_dispatch:
@@ -52,12 +52,16 @@ jobs:
5252
- name: Generate csproj
5353
working-directory: templates/Template.DatasyncServer
5454
run: |
55-
(Get-Content -path "Template.DatasyncServer.csproj.template") -replace "${NUGET_VERSION}", "$(BUILD_VERSION)" | Set-Content -Path "./Template.DatasyncServer.csproj"
55+
(Get-Content -path "Template.DatasyncServer.csproj.template") -replace "${NUGET_VERSION}", $BUILD_VERSION | Set-Content -Path "./Template.DatasyncServer.csproj"
5656
shell: pwsh
5757

5858
- name: Build template
5959
working-directory: templates
60-
run: dotnet pack DatasyncTemplates.csproj --configuration $(DOTNET_CONFIGURATION) --output ${{ env.NuGetDirectory }} /p:PackageVersion-$(BUILD_VERSION)
60+
run: >
61+
dotnet pack DatasyncTemplates.csproj
62+
--configuration ${{ env.DOTNET_CONFIGURATION }}
63+
--output ${{ env.NuGetDirectory }}
64+
-p:PackageVersion=$BUILD_VERSION
6165
6266
- name: Upload NuGet packages
6367
uses: actions/upload-artifact@v4

templates/DatasyncTemplates.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<EmbedUntrackedSources>true</EmbedUntrackedSources>
66
<IncludeBuildOutput>false</IncludeBuildOutput>
77
<IncludeContentInPack>true</IncludeContentInPack>
8+
<NoPackageAnalysis>true</NoPackageAnalysis>
89
<PackageId>CommunityToolkit.Datasync.Server.Template.CSharp</PackageId>
910
<PackageTags>dotnet-new;template;aspnetcore;datasync</PackageTags>
1011
<PackageType>Template</PackageType>

0 commit comments

Comments
 (0)