Bump the npm_and_yarn group across 1 directory with 3 updates #105
Workflow file for this run
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: Package up Prerelease. | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - develop | |
| - rc | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| # Only run on PR merge, skip Dependabot PRs | |
| if: github.event.pull_request.merged == true && github.event.pull_request.user.login != 'dependabot[bot]' | |
| runs-on: windows-latest | |
| # runs-on: self-hosted | |
| env: | |
| CONFIG: 'Release' | |
| SOLUTION_FILE: './UmbNav.slnx' | |
| OUT_FOLDER: './build.out/' | |
| steps: | |
| - name: Setup dotnet | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 10.x | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v4.2.0 | |
| with: | |
| versionSpec: '5.x' | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 23 | |
| cache: 'npm' | |
| cache-dependency-path: ./Umbraco.Community.UmbNav/package-lock.json | |
| - run: npm ci | |
| working-directory: ./Umbraco.Community.UmbNav/ | |
| - run: npm run build | |
| working-directory: ./Umbraco.Community.UmbNav/ | |
| # - name: Install Playwright Browsers | |
| # run: npx playwright install --with-deps | |
| # working-directory: ./Umbraco.Community.UmbNav/ | |
| # - name: Run Playwright tests | |
| # run: npx playwright test | |
| # working-directory: ./Umbraco.Community.UmbNav/ | |
| # - name: Upload Playwright test report | |
| # uses: actions/upload-artifact@v4 | |
| # if: always() | |
| # with: | |
| # name: playwright-report | |
| # path: ./Umbraco.Community.UmbNav/playwright-report/ | |
| # retention-days: 30 | |
| - name: Retrieve cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget-umbcheckout | |
| - name: Determine Version with GitVersion (MSBuild in Proj will do this) | |
| id: gitversion | |
| uses: gittools/actions/gitversion/execute@v4.2.0 | |
| with: | |
| useConfigFile: true | |
| configFilePath: ./GitVersion.yml | |
| - name: Display GitVersion SemVer | |
| run: | | |
| echo "FullSemVer: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" | |
| - name: Update umbraco-package.json version | |
| uses: jossef/action-set-json-field@v2.2 | |
| with: | |
| file: Umbraco.Community.UmbNav/wwwroot/App_Plugins/UmbNav/umbraco-package.json | |
| field: version | |
| value: ${{ steps.gitversion.outputs.nuGetVersionV2 }} | |
| - name: Update package.json version | |
| uses: jossef/action-set-json-field@v2.2 | |
| with: | |
| file: Umbraco.Community.UmbNav/package.json | |
| field: version | |
| value: ${{ steps.gitversion.outputs.semVer }} | |
| # ------------------------ | |
| # actual builds / packages | |
| # ------------------------ | |
| - name: Restore Umbraco.Community.UmbNav | |
| run: dotnet restore ./Umbraco.Community.UmbNav/Umbraco.Community.UmbNav.csproj | |
| - name: Restore Umbraco.Community.UmbNav.Core | |
| run: dotnet restore ./Umbraco.Community.UmbNav.Core/Umbraco.Community.UmbNav.Core.csproj | |
| - name: Restore Umbraco.Community.UmbNav.Core.Tests | |
| run: dotnet restore ./Umbraco.Community.UmbNav.Core.Tests/Umbraco.Community.UmbNav.Core.Tests.csproj | |
| - name: Run Tests | |
| run: dotnet test ./Umbraco.Community.UmbNav.Core.Tests/Umbraco.Community.UmbNav.Core.Tests.csproj --no-restore -c Debug | |
| - name: Build Umbraco.Community.UmbNav | |
| run: dotnet pack ./Umbraco.Community.UmbNav/Umbraco.Community.UmbNav.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.nuGetVersionV2}} | |
| - name: Build Umbraco.Community.UmbNav.Core | |
| run: dotnet pack ./Umbraco.Community.UmbNav.Core/Umbraco.Community.UmbNav.Core.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.nuGetVersionV2}} | |
| - name: Push to GitHub Nuget Repo | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: | | |
| dotnet nuget push ./build.out/Umbraco.Community.UmbNav.${{steps.gitversion.outputs.nuGetVersionV2}}.nupkg --skip-duplicate --source https://nuget.pkg.github.com/AaronSadlerUK/index.json --api-key ${{ secrets.GH_PAT }} | |
| dotnet nuget push ./build.out/Umbraco.Community.UmbNav.Core.${{steps.gitversion.outputs.nuGetVersionV2}}.nupkg --skip-duplicate --source https://nuget.pkg.github.com/AaronSadlerUK/index.json --api-key ${{ secrets.GH_PAT }} | |
| - name: Push to Nuget Repo | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: | | |
| dotnet nuget push ./build.out/Umbraco.Community.UmbNav.${{steps.gitversion.outputs.nuGetVersionV2}}.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} | |
| dotnet nuget push ./build.out/Umbraco.Community.UmbNav.Core.${{steps.gitversion.outputs.nuGetVersionV2}}.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} | |
| - name: Create Release | |
| run: | | |
| gh release create ${{steps.gitversion.outputs.fullSemVer}} ` | |
| ./build.out/Umbraco.Community.UmbNav.${{steps.gitversion.outputs.nuGetVersionV2}}.nupkg ` | |
| ./build.out/Umbraco.Community.UmbNav.Core.${{steps.gitversion.outputs.nuGetVersionV2}}.nupkg ` | |
| --title "${{steps.gitversion.outputs.fullSemVer}}" ` | |
| --prerelease ` | |
| --generate-notes | |
| env: | |
| GH_TOKEN: ${{ github.token }} |