package build test. #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Package. | |
on: | |
push: | |
branches: [v15/actions] | |
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: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .Net core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.0.x | |
- name: restore | |
run: dotnet restore ${{ env.solution_name}} | |
- 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: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- 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: 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}} |