Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 14 additions & 21 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 \
Expand All @@ -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
Expand Down Expand Up @@ -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"

Expand All @@ -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:
Expand All @@ -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 {} \;

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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"
Expand Down
39 changes: 15 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 \
Expand All @@ -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)
Expand Down Expand Up @@ -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 {} \;

Expand All @@ -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" \
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -170,26 +172,15 @@ 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 \
/p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \
/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:
Expand Down
38 changes: 21 additions & 17 deletions .github/workflows/reuseable-ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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:
Expand All @@ -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
Expand Down
13 changes: 0 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))
Loading