Save blueprints via SaveBlueprint on the bulk save path (#1035) #162
This file contains hidden or 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 | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| # NOTE: uSync releases from "v{major}/main" - a branch per Umbraco major. Plain "main" | |
| # is kept in the filter so a re-created main, or a branch that hasn't been moved over | |
| # yet, still builds. | |
| on: | |
| push: | |
| branches: [ "main", "*/main" ] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| config: Release | |
| out_folder: ./build-out/ | |
| solution_name: ./uSync.slnx | |
| test_project: ./uSync.Tests/uSync.Tests.csproj | |
| schema_gen_project: ./uSync.SchemaGenerator/uSync.SchemaGenerator.csproj | |
| jobs: | |
| version: | |
| runs-on: windows-latest | |
| outputs: | |
| version_string: ${{ steps.gitversion.outputs.fullSemVer }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install GitVersion | |
| # pinned to v3 on purpose: v4 of this action requires GitVersion >= 6.2, and our | |
| # GitVersion.yml is still v5 schema (mode / tag rather than deployment-mode / label). | |
| # Moving to v4 means migrating that config too - see the dependabot ignore. | |
| 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 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-dotnet@v6 | |
| with: | |
| global-json-file: global.json | |
| cache: true | |
| cache-dependency-path: "**/packages.lock.json" | |
| # the client project's build runs `npm run build` via an MSBuild target, | |
| # so node needs to be available before the dotnet build step below. | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: "lts/*" | |
| - 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.test_project }} -c ${{ env.config }} | |
| - 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@v7 | |
| - uses: actions/setup-dotnet@v6 | |
| with: | |
| global-json-file: global.json | |
| cache: true | |
| cache-dependency-path: "**/packages.lock.json" | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: "lts/*" | |
| - 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.AutoTemplates | |
| run: dotnet pack ./uSync.AutoTemplates/uSync.AutoTemplates.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: package uSync.Extend | |
| run: dotnet pack ./uSync.Extend/uSync.Extend.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }} | |
| - name: package uSync.History | |
| run: dotnet pack ./uSync.History/uSync.History.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }} | |
| - name: package uSync (meta package) | |
| run: dotnet pack ./uSync/uSync.csproj -c ${{env.config}} --output ${{env.out_folder}} /p:version=${{ needs.version.outputs.version_string }} | |
| # NOTE: intentionally no `dotnet nuget push` / `npm publish` step here - this | |
| # workflow builds artifacts on every push to a release branch for review. The | |
| # actual release happens in release.yml, triggered by pushing a v{version} tag. | |
| - name: Upload nuget file as build artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Nuget Build Output | |
| path: ${{ env.out_folder }} |