Skip to content

flatten the get content logic in templates. (#717) #29

flatten the get content logic in templates. (#717)

flatten the get content logic in templates. (#717) #29

Workflow file for this run

name: Build and Package.
on:
push:
branches: [v15/main]
env:
config: Release
out_folder: ./build-out/
jobs:
version:
runs-on: windows-latest
outputs:
version_string: ${{ steps.gitversion.outputs.fullSemVer }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3
with:
versionSpec: "5.x"
- name: Determine Version with GitVersion (MSBuild in Proj will do this)
id: gitversion
uses: gittools/actions/gitversion/execute@v3
with:
useConfigFile: true
configFilePath: ./GitVersion.yml
- name: Display version
run: |
echo "Full Version: ${{ steps.gitversion.outputs.fullSemVer }}"
build-project:
runs-on: windows-latest
needs: version
env:
solution_name: ./uSync.sln
test_project: ./uSync.Tests/uSync.tests.csproj
schema_gen_project: ./uSync.SchemaGenerator/uSync.SchemaGenerator.csproj
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
cache: true
cache-dependency-path: "**/packages.lock.json"
- name: restore
run: dotnet restore ${{ env.solution_name}} --locked-mode
- name: build
run: dotnet build ${{ env.solution_name }} -c ${{ env.config }} -p:ContinuousIntegrationBuild=true
- name: test
run: dotnet test ${{ env.solution_name }}
- name: Generate AppSettings Schema
run: dotnet run -c ${{env.Config}} --project ${{ env.schema_gen_project}}
package-up:
runs-on: windows-latest
needs: [build-project, version]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
cache: true
cache-dependency-path: "**/packages.lock.json"
- name: version
run: |
echo "Version: ${{ needs.version.outputs.version_string}}"
- name: Stamp version on NPM Package
working-directory: ./uSync.Backoffice.Management.Client/usync-assets
run: npm version ${{ needs.version.outputs.version_string }}
- name: npm install
working-directory: ./uSync.Backoffice.Management.Client/usync-assets
run: npm ci
- name: npm build
working-directory: ./uSync.Backoffice.Management.Client/usync-assets
run: npm run build
- name: restore
run: dotnet restore ${{ env.solution_name}} --locked-mode
- name: package uSync.Core
run: dotnet pack ./uSync.Core/uSync.Core.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Backoffice
run: dotnet pack ./uSync.Backoffice/uSync.Backoffice.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Backoffice.Management.Api
run: dotnet pack ./uSync.Backoffice.Management.Api/uSync.Backoffice.Management.Api.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Backoffice.Management.Client
run: dotnet pack ./uSync.Backoffice.Management.Client/uSync.Backoffice.Management.Client.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Backoffice.Targets
run: dotnet pack ./uSync.Backoffice.Targets/uSync.Backoffice.Targets.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Community.Contrib
run: dotnet pack ./uSync.Community.Contrib/uSync.Community.Contrib.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: package uSync.Community.DataTypeSerializers
run: dotnet pack ./uSync.Community.DataTypeSerializers/uSync.Community.DataTypeSerializers.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }}
- name: Upload nuget file as build artifact
uses: actions/upload-artifact@v4
with:
name: Nuget Build Output
path: ${{env.OUT_FOLDER}}