Skip to content

Commit

Permalink
Template 3 (#17)
Browse files Browse the repository at this point in the history
* Fix up of github action

* More github action

* Fixing the release/debug flag

* Fix for NU5128 warning
  • Loading branch information
adrianhall authored May 10, 2024
1 parent 3e2f31f commit 7625ad2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Build and Test Library
on:
push:
branches: [ main ]
paths: [ 'src/**', 'tests/**', 'Datasync Solution.sln' ]
paths: [ 'src/**', 'tests/**', 'Datasync Solution.sln', '.github/workflows/build-library.yml', '.github/workflows/SignedPackageFileList.txt' ]
pull_request:
branches: [ main ]
paths: [ 'src/**', 'tests/**', 'Datasync Solution.sln' ]
paths: [ 'src/**', 'tests/**', 'Datasync Solution.sln', '.github/workflows/build-library.yml', '.github/workflows/SignedPackageFileList.txt' ]
release:
types: [ published ]
workflow_dispatch:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Build Templates
on:
push:
branches: [ main ]
paths: [ 'templates/**' ]
paths: [ 'templates/**', '.github/workflows/build-template.yml', '.github/workflows/SignedTemplateFileList.txt' ]
pull_request:
branches: [ main ]
paths: [ 'templates/**' ]
paths: [ 'templates/**', '.github/workflows/build-template.yml', '.github/workflows/SignedTemplateFileList.txt' ]
release:
types: [ published ]
workflow_dispatch:
Expand Down Expand Up @@ -52,12 +52,16 @@ jobs:
- name: Generate csproj
working-directory: templates/Template.DatasyncServer
run: |
(Get-Content -path "Template.DatasyncServer.csproj.template") -replace "${NUGET_VERSION}", "$(BUILD_VERSION)" | Set-Content -Path "./Template.DatasyncServer.csproj"
(Get-Content -path "Template.DatasyncServer.csproj.template") -replace "${NUGET_VERSION}", $BUILD_VERSION | Set-Content -Path "./Template.DatasyncServer.csproj"
shell: pwsh

- name: Build template
working-directory: templates
run: dotnet pack DatasyncTemplates.csproj --configuration $(DOTNET_CONFIGURATION) --output ${{ env.NuGetDirectory }} /p:PackageVersion-$(BUILD_VERSION)
run: >
dotnet pack DatasyncTemplates.csproj
--configuration ${{ env.DOTNET_CONFIGURATION }}
--output ${{ env.NuGetDirectory }}
-p:PackageVersion=$BUILD_VERSION
- name: Upload NuGet packages
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions templates/DatasyncTemplates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeContentInPack>true</IncludeContentInPack>
<NoPackageAnalysis>true</NoPackageAnalysis>
<PackageId>CommunityToolkit.Datasync.Server.Template.CSharp</PackageId>
<PackageTags>dotnet-new;template;aspnetcore;datasync</PackageTags>
<PackageType>Template</PackageType>
Expand Down

0 comments on commit 7625ad2

Please sign in to comment.