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
2 changes: 1 addition & 1 deletion .github/workflows/backup-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout master branch
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: master
fetch-depth: 0 # Required to push to another branch
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
cache-dependency-path: package-lock.json

- name: Show Node.js and npm versions
run: |
echo "Node.js version: $(node -v)"
echo "npm version: $(npm -v)"
#- name: Show Node.js and npm versions
# run: |
# echo "Node.js version: $(node -v)"
# echo "npm version: $(npm -v)"

- name: Upgrade npm
run: |
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:

steps:
- name: Download clean source archive
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: clean-source
path: ./
Expand All @@ -120,17 +120,17 @@ jobs:
run: rm clean-source.tar.gz

- name: Set up Node.js for npmjs
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: npm
cache-dependency-path: package-lock.json

- name: Show Node.js and npm versions
run: |
echo "Node.js version: $(node -v)"
echo "npm version: $(npm -v)"
#- name: Show Node.js and npm versions
# run: |
# echo "Node.js version: $(node -v)"
# echo "npm version: $(npm -v)"

- name: Upgrade npm
run: |
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:

steps:
- name: Download clean source archive
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: clean-source
path: ./
Expand All @@ -181,17 +181,17 @@ jobs:
run: rm clean-source.tar.gz

- name: Set up Node.js for GPR
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
registry-url: https://npm.pkg.github.com/
cache: npm
cache-dependency-path: package-lock.json

- name: Show Node.js and npm versions
run: |
echo "Node.js version: $(node -v)"
echo "npm version: $(npm -v)"
#- name: Show Node.js and npm versions
# run: |
# echo "Node.js version: $(node -v)"
# echo "npm version: $(npm -v)"

- name: Upgrade npm
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-security-txt-expiry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Check security.txt expiration
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
4 changes: 2 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Authenticate GitHub CLI
run: gh auth status
Expand All @@ -42,7 +42,7 @@ jobs:
run: 'echo "ENV_MODE is set to: $ENV_MODE"'

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Log ENV_MODE
run: 'echo "ENV_MODE is set to: $ENV_MODE"'

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
Expand Down
37 changes: 22 additions & 15 deletions .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
Expand All @@ -59,25 +59,32 @@ jobs:
id: jsdoc_lint
continue-on-error: true
run: |
set -e
output=$(npm run lint:jsdoc || true)
echo "$output" | tee jsdoc-lint-output.txt

count=$(echo "$output" | wc -l)
count=$(echo "$output" | grep -cve '^\s*$')
echo "jsdoc_count=$count" >> "$GITHUB_OUTPUT"

- name: ✅ Pass
if: steps.jsdoc_lint.outputs.jsdoc_count == '0'
run: echo "JSDoc lint passed successfully!"
- name: PASS
if: ${{ steps.jsdoc_lint.outputs.jsdoc_count == 0 }}
run: echo "JSDoc lint passed successfully!"

- name: ⚠️ JSDoc violations detected (non-blocking)
if: steps.jsdoc_lint.outputs.jsdoc_count != '0'
- name: JSDoc violations detected (non-blocking)
if: ${{ steps.jsdoc_lint.outputs.jsdoc_count != 0 }}
run: |
echo "⚠️ JSDoc lint check failed with ${{ steps.jsdoc_lint.outputs.jsdoc_count }} violations (non-blocking)"
echo "--- JSDoc Violations ---"
cat jsdoc-lint-output.txt

# Test to ensure the package is working
- name: Upload JSDoc results
if: ${{ steps.jsdoc_lint.outputs.jsdoc_count != 0 }}
uses: actions/upload-artifact@v4
with:
name: jsdoc-lint-results
path: jsdoc-lint-output.txt
if-no-files-found: error

# Build to ensure the package is functional
- name: Build Node.js project
run: npm run build

Expand All @@ -99,7 +106,7 @@ jobs:

steps:
- name: Download clean source archive
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: clean-source
path: ./
Expand All @@ -111,7 +118,7 @@ jobs:
run: rm clean-source.tar.gz

- name: Set up Node.js for npmjs
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
registry-url: https://registry.npmjs.org/
Expand Down Expand Up @@ -160,7 +167,7 @@ jobs:

steps:
- name: Download clean source archive
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: clean-source
path: ./
Expand All @@ -172,7 +179,7 @@ jobs:
run: rm clean-source.tar.gz

- name: Set up Node.js for GPR
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
registry-url: https://npm.pkg.github.com/
Expand All @@ -199,7 +206,7 @@ jobs:

- name: Update package name for GPR
run: |
sed -i 's/"name": ".*"/"name": "@netwk-pro\/web"/' package.json
sed -i 's/"name": "[^"]*"/"name": "@netwk-pro\/web"/' package.json

- name: Verify version not already published
run: |
Expand Down
63 changes: 35 additions & 28 deletions .github/workflows/templates/publish.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Reusable GitHub Actions workflow to build and publish a package to npmjs and
# GPR.
#
# Version: v1.0.0
# Version: v1.1.0
# Maintainer: Scott Lopez <support@neteng.pro>
# Usage: Copy to `.github/workflows/publish.yml` in your repo or reference
# directly if shared centrally.
Expand Down Expand Up @@ -40,19 +40,19 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
cache-dependency-path: package-lock.json

- name: Show Node.js and npm versions
run: |
echo "Node.js version: $(node -v)"
echo "npm version: $(npm -v)"
#- name: Show Node.js and npm versions
# run: |
# echo "Node.js version: $(node -v)"
# echo "npm version: $(npm -v)"

- name: Upgrade npm
run: |
Expand All @@ -69,25 +69,32 @@ jobs:
id: jsdoc_lint
continue-on-error: true
run: |
set -e
output=$(npm run lint:jsdoc || true)
echo "$output" | tee jsdoc-lint-output.txt

count=$(echo "$output" | wc -l)
count=$(echo "$output" | grep -cve '^\s*$')
echo "jsdoc_count=$count" >> "$GITHUB_OUTPUT"

- name: ✅ Pass
if: steps.jsdoc_lint.outputs.jsdoc_count == '0'
run: echo "JSDoc lint passed successfully!"
- name: PASS
if: ${{ steps.jsdoc_lint.outputs.jsdoc_count == 0 }}
run: echo "JSDoc lint passed successfully!"

- name: ⚠️ JSDoc violations detected (non-blocking)
if: steps.jsdoc_lint.outputs.jsdoc_count != '0'
- name: JSDoc violations detected (non-blocking)
if: ${{ steps.jsdoc_lint.outputs.jsdoc_count != 0 }}
run: |
echo "⚠️ JSDoc lint check failed with ${{ steps.jsdoc_lint.outputs.jsdoc_count }} violations (non-blocking)"
echo "--- JSDoc Violations ---"
cat jsdoc-lint-output.txt

# Test to ensure the package is working
- name: Upload JSDoc results
if: ${{ steps.jsdoc_lint.outputs.jsdoc_count != 0 }}
uses: actions/upload-artifact@v4
with:
name: jsdoc-lint-results
path: jsdoc-lint-output.txt
if-no-files-found: error

# Build to ensure the package is functional
- name: Build Node.js project
run: npm run build

Expand All @@ -109,7 +116,7 @@ jobs:

steps:
- name: Download clean source archive
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: clean-source
path: ./
Expand All @@ -121,17 +128,17 @@ jobs:
run: rm clean-source.tar.gz

- name: Set up Node.js for npmjs
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: npm
cache-dependency-path: package-lock.json

- name: Show Node.js and npm versions
run: |
echo "Node.js version: $(node -v)"
echo "npm version: $(npm -v)"
#- name: Show Node.js and npm versions
# run: |
# echo "Node.js version: $(node -v)"
# echo "npm version: $(npm -v)"

- name: Upgrade npm
run: |
Expand Down Expand Up @@ -170,7 +177,7 @@ jobs:

steps:
- name: Download clean source archive
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: clean-source
path: ./
Expand All @@ -182,17 +189,17 @@ jobs:
run: rm clean-source.tar.gz

- name: Set up Node.js for GPR
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
registry-url: https://npm.pkg.github.com/
cache: npm
cache-dependency-path: package-lock.json

- name: Show Node.js and npm versions
run: |
echo "Node.js version: $(node -v)"
echo "npm version: $(npm -v)"
#- name: Show Node.js and npm versions
# run: |
# echo "Node.js version: $(node -v)"
# echo "npm version: $(npm -v)"

- name: Upgrade npm
run: |
Expand All @@ -209,7 +216,7 @@ jobs:

- name: Update package name for GPR
run: |
sed -i 's/"name": ".*"/"name": "@netwk-pro\/web"/' package.json
sed -i 's/"name": "[^"]*"/"name": "@netwk-pro\/web"/' package.json

- name: Verify version not already published
run: |
Expand Down
Loading
Loading