diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 2e858c7..1be9c7a 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -31,7 +31,7 @@ env: jobs: call-reusable-ci-checks-workflow: - name: run ci checks + name: Run CI checks uses: ./.github/workflows/reuseable-ci-checks.yml with: runall: true @@ -42,6 +42,7 @@ jobs: # We do not proceed from the point if there is a fail. # Hence explicit "if" and "needs" generate-dev-semantic-version: + name: Generate dev semantic version if: success() needs: [call-reusable-ci-checks-workflow] runs-on: ubuntu-latest @@ -55,7 +56,7 @@ jobs: fetch-depth: 0 # Required for Semantic Release to analyze commit history - - name: Install Semantic Release Packages + - name: Install semantic release packages run: | echo "Installing semantic-release packages..." npm install -D \ @@ -71,7 +72,7 @@ jobs: - - name: Run Semantic Version (None Blocking) + - name: Run semantic version (None Blocking) run: | # If no version is required we can get an error so here we handle it set +e @@ -104,8 +105,8 @@ jobs: set -e - - name: Rename Semver Version With Date Time Dev - id: set-dev-semantic-version + - name: Rename Semver Version with branch date time dev + id: set_dev_semantic_version run: | echo "Semantic Release Output $SEMVER_OUTPUT" @@ -121,7 +122,8 @@ jobs: build-telblazor-dev-package-and-publish: - if: success() + if: success() + name: Build dev package and publish needs: [generate-dev-semantic-version, call-reusable-ci-checks-workflow] runs-on: ubuntu-latest env: @@ -135,13 +137,13 @@ jobs: with: global-json-file: global.json - - name: Debug Version Output DEV_TELBLAZOR_PACKAGE_VERSION var + - name: Debug version output DEV_TELBLAZOR_PACKAGE_VERSION run: echo "Extracted Version $DEV_TELBLAZOR_PACKAGE_VERSION " - name: Replace local environment variable in nuget config because cant provide it as a parameter run: sed -i "s|%TELBlazorPackageSource%|$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH|g" nuget.config - - name: Clean lock files because the newly generated package file will superseed the locks + - name: Clean lock files because the newly generated package file will supersede the locks run: | find . -name "packages.lock.json" -type f -exec rm -f {} \; @@ -174,8 +176,8 @@ jobs: - Make-WasmStaticClient-DevShowCase-Artifact-Trigger-GH-Pages-In-TELBlazor-DevShowCase-Repo: - + trigger-gh-pages-telblazor-devshowcase-workflow: + name: Create artifact and provide it to TelBlazor-DevShowCase repo and its gh-page trigger if: success() #not needed but being explicit needs: [build-telblazor-dev-package-and-publish, generate-dev-semantic-version, call-reusable-ci-checks-workflow] runs-on: ubuntu-latest @@ -191,7 +193,7 @@ jobs: with: global-json-file: global.json - - name: Clean Solution + - name: Clean solution run: | echo "Cleaning the solution..." dotnet clean TELBlazor.sln @@ -219,15 +221,6 @@ jobs: find . -name "packages.lock.json" -type f -print - #qqqq with recent changes can we just build the solution now if this works then check - # - name: Build TELBlazor.Components.ShowCase.Shared - # run: | - # dotnet build TELBlazor.Components.ShowCase.Shared -c Release \ - # /p:TELBlazorPackageVersion=$DEV_TELBLAZOR_PACKAGE_VERSION \ - # /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ - # /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ - # /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE - - name: Publish WasmStaticClient run: | @@ -261,7 +254,7 @@ jobs: echo "Artifact URL: $ARTIFACT_URL" echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_ENV - - name: Trigger Workflow in TELBlazor-DevShowCase Repository + - name: Trigger workflow in TELBlazor-DevShowCase repo run: | repo_owner="TechnologyEnhancedLearning" repo_name="TELBlazor-DevShowCase" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae3321a..0e46795 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,7 @@ env: jobs: generate-semantic-version: + name: Generate semantic version for package and repo runs-on: ubuntu-latest outputs: semantic-release-version: ${{ steps.set-semantic-version.outputs.semantic-release-version }} @@ -38,7 +39,7 @@ jobs: with: fetch-depth: 0 # required for semantic release to analyze commit history - - name: Install Semantic Release Packages + - name: Install semantic release packages run: | echo "Installing semantic-release packages..." npm install -D \ @@ -54,8 +55,8 @@ jobs: #configured with .releaseseec - - name: run semantic release - id: set-semantic-version + - name: Run semantic release + id: set_semantic_version run: | set +e RELEASE_OUTPUT=$(npx semantic-release 2>&1) @@ -95,14 +96,14 @@ jobs: # the restore cant be given env values to override values like it can in build so we need to remove this file so we use the env values - - name: Remove Local PackageSettings (CI Only) + - name: Remove local package settings (CI Only) run: rm -f PackageSettings.props.local - name: Replace local environment variable in nuget config because cant provide it as a parameter run: sed -i "s|%TELBlazorPackageSource%|$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH|g" nuget.config - - name: Clean lock files because the newly generated package file will superseed the locks + - name: Clean lock files because the newly generated package file will supersede the locks run: | find . -name "packages.lock.json" -type f -exec rm -f {} \; @@ -117,15 +118,15 @@ jobs: run: npm ci #CI is an install with adhering to package-lock - - name: Build and Pack BlazorComponentLibrary + - name: Build and pack TELBlazor.Components run: | - dotnet build Package.BlazorComponentLibrary -c Release \ + dotnet build TELBlazor.Components -c Release \ /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ /p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION - - name: Publish to TechnologyEnhancedLearning Package + - name: Publish to TELBlazor.Components Package run: | dotnet nuget push "$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH/TELBlazor.Components.*.nupkg" \ --source "$TELBLAZOR_PACKAGE_SOURCE" \ @@ -134,7 +135,8 @@ jobs: - Update-gh-pages-site: + update-gh-pages-site: + name: Update the production TELBlazor ShowCase page (on this repo) needs: [build-telblazor-package-and-publish, generate-semantic-version] runs-on: ubuntu-latest if: ${{ needs.generate-semantic-version.outputs.semantic-release-version != '' }} # Only run if there's a version @@ -149,7 +151,7 @@ jobs: with: global-json-file: global.json - - name: Remove Local PackageSettings (CI Only) + - name: Remove local packagesettings (CI Only) run: rm -f PackageSettings.props.local - name: Replace local environment variable in nuget config because cant provide it as a parameter @@ -159,7 +161,7 @@ jobs: sed -i "s|%GITHUB_PACKAGES_TOKEN%|$PACKAGES_TOKEN |g" nuget.config - - name: Clean lock files because the newly generated package file will superseed the locks + - name: Clean lock files because the newly generated package file will supersede the locks run: | echo "Listing packages.lock.json files:" find . -name "packages.lock.json" -type f -print @@ -170,17 +172,8 @@ jobs: echo "Listing packages.lock.json files:" find . -name "packages.lock.json" -type f -print - #qqqq do we need this can we not build the package, then build the project with package build false or just build the package then the wasm proje - # - name: Build TELBlazor.Components.ShowCase.Shared - # run: | - # dotnet build TELBlazor.Components.ShowCase.Shared -c Release \ - # /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ - # /p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \ - # /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ - # /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE - - - - name: Publish WasmStaticClient + + - name: Publish WasmStaticClient TELBlazor ShowCase run: | dotnet publish ./TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj --configuration Release \ /p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \ @@ -188,8 +181,6 @@ jobs: /p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \ /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE - - # No this will be in the release branch that we do a prod wiki host - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/.github/workflows/reuseable-ci-checks.yml b/.github/workflows/reuseable-ci-checks.yml index 43dfdf9..7d2b867 100644 --- a/.github/workflows/reuseable-ci-checks.yml +++ b/.github/workflows/reuseable-ci-checks.yml @@ -35,7 +35,7 @@ jobs: # Build Package # Build Solution useing package reuseable-ci-checks-solution-build: - name: Check Solution Builds + name: Check solution builds runs-on: ubuntu-latest continue-on-error: ${{ inputs.runall }} outputs: @@ -66,7 +66,7 @@ jobs: working-directory: ./TELBlazor.Components run: npm ci - - name: Build and Create Package locally + - name: Build and create package locally env: #Overwrite package generation DISABLE_PACKAGE_GENERATION: false @@ -78,7 +78,7 @@ jobs: /p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE \ /p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION - - name: Build Solution without generating new package + - name: Build solution without generating new package env: #Overwrite package generation DISABLE_PACKAGE_GENERATION: true @@ -92,7 +92,7 @@ jobs: reuseable-ci-checks-branch-name-check: - name: Enforce Branch Name Convention + name: Check branch names if: success() || failure() continue-on-error: ${{ inputs.runall }} outputs: @@ -116,6 +116,7 @@ jobs: reuseable-ci-checks-commitlint: + name: Check commit names runs-on: ubuntu-latest if: success() || failure() continue-on-error: ${{ inputs.runall }} @@ -131,7 +132,8 @@ jobs: configFile: .commitlintrc.json - reuseable-ci-checks-Unit-Tests: + reuseable-ci-checks-unit-tests: + name: Unit test components runs-on: ubuntu-latest if: success() || failure() continue-on-error: ${{ inputs.runall }} @@ -143,7 +145,8 @@ jobs: - reuseable-ci-checks-E2E-Tests: + reuseable-ci-checks-e2e-tests: + name: Check with end to end testing including nojs runs-on: ubuntu-latest if: success() || failure() continue-on-error: ${{ inputs.runall }} @@ -154,7 +157,8 @@ jobs: run: echo " See other project pipeline for Tests this is a placeholder" - reuseable-ci-checks-Code-Coverage: + reuseable-ci-checks-code-coverage: + name: Check for code coverage runs-on: ubuntu-latest if: success() || failure() continue-on-error: ${{ inputs.runall }} @@ -165,16 +169,16 @@ jobs: run: echo " See other project pipeline for Tests this is a placeholder" - reuseable-ci-checks-Check-For-Fails: + reuseable-ci-checks-check-for-failed-jobs: name: Check for failures if: ${{ inputs.runall }} needs: - reuseable-ci-checks-solution-build - reuseable-ci-checks-branch-name-check - reuseable-ci-checks-commitlint - - reuseable-ci-checks-Unit-Tests - - reuseable-ci-checks-E2E-Tests - - reuseable-ci-checks-Code-Coverage + - reuseable-ci-checks-unit-tests + - reuseable-ci-checks-e2e-tests + - reuseable-ci-checks-code-coverage runs-on: ubuntu-latest steps: @@ -183,17 +187,17 @@ jobs: echo "Solution Build: ${{ needs.reuseable-ci-checks-solution-build.outputs.status }}" echo "Branch Name Check: ${{ needs.reuseable-ci-checks-branch-name-check.outputs.status }}" echo "Commitlint: ${{ needs.reuseable-ci-checks-commitlint.outputs.status }}" - echo "Unit Tests: ${{ needs.reuseable-ci-checks-Unit-Tests.outputs.status }}" - echo "E2E Tests: ${{ needs.reuseable-ci-checks-E2E-Tests.outputs.status }}" - echo "Code Coverage: ${{ needs.reuseable-ci-checks-Code-Coverage.outputs.status }}" + echo "Unit Tests: ${{ needs.reuseable-ci-checks-unit-tests.outputs.status }}" + echo "E2E Tests: ${{ needs.reuseable-ci-checks-e2e-tests.outputs.status }}" + echo "Code Coverage: ${{ needs.reuseable-ci-checks-code-coverage.outputs.status }}" # Check if any job is not success (failure, cancelled, skipped) if [[ "${{ needs.reuseable-ci-checks-solution-build.outputs.status }}" != "success" || \ "${{ needs.reuseable-ci-checks-branch-name-check.outputs.status }}" != "success" || \ "${{ needs.reuseable-ci-checks-commitlint.outputs.status }}" != "success" || \ - "${{ needs.reuseable-ci-checks-Unit-Tests.outputs.status }}" != "success" || \ - "${{ needs.reuseable-ci-checks-E2E-Tests.outputs.status }}" != "success" || \ - "${{ needs.reuseable-ci-checks-Code-Coverage.outputs.status }}" != "success" ]]; then + "${{ needs.reuseable-ci-checks-unit-tests.outputs.status }}" != "success" || \ + "${{ needs.reuseable-ci-checks-e2e-tests.outputs.status }}" != "success" || \ + "${{ needs.reuseable-ci-checks-code-coverage.outputs.status }}" != "success" ]]; then echo "❌ One or more jobs failed." exit 1 fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 75ffb94..e69de29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +0,0 @@ -## [1.0.2](https://github.com/TechnologyEnhancedLearning/TELBlazor/compare/v1.0.1...v1.0.2) (2025-05-06) - - -### Bug Fixes - -* **cause version:** minor version ([cc9b39f](https://github.com/TechnologyEnhancedLearning/TELBlazor/commit/cc9b39f053df98276c142f5e9e3849a8583dc9ea)) - -## [1.0.2-ci-setup.1](https://github.com/TechnologyEnhancedLearning/TELBlazor/compare/v1.0.1...v1.0.2-ci-setup.1) (2025-05-06) - - -### Bug Fixes - -* **cause version:** minor version ([cc9b39f](https://github.com/TechnologyEnhancedLearning/TELBlazor/commit/cc9b39f053df98276c142f5e9e3849a8583dc9ea))