Skip to content

[web.tools] release 0.0.72 #17

[web.tools] release 0.0.72

[web.tools] release 0.0.72 #17

Workflow file for this run

name: "@luzzle/web.tools"
on:
push:
branches:
- main
tags:
- 'web.tools/v*'
paths:
- 'packages/web/tools/**'
- '.github/workflows/web-tools.yml'
permissions:
contents: read
id-token: write
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install Dependencies
run: npm ci -w @luzzle/core -w @luzzle/web.utils -w @luzzle/web.tools
- name: Build Dependencies
run: npm run build -w @luzzle/core -w @luzzle/web.utils
- name: Build
run: npm run build -w @luzzle/web.tools
- name: Lint
run: npm run lint -w @luzzle/web.tools
- name: Test
run: npm run test -w @luzzle/web.tools
publish:
needs: check
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'web.tools/v')
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
# Ensure latest npm for trusted publishing support
- name: Install npm
run: npm install -g npm@latest
- name: Install Dependencies
run: npm ci -w @luzzle/web.tools
- name: Build
run: npm run build -w @luzzle/core -w @luzzle/web.utils -w @luzzle/web.tools
- name: Check Version
run: |
cd packages/web/tools
VERSION_FROM_PKG=$(npm pkg get version --workspaces=false | tr -d '"')
TAG_NAME=${GITHUB_REF#refs/tags/}
VERSION_FROM_TAG=${TAG_NAME#web.tools/v}
if [ "$VERSION_FROM_TAG" != "$VERSION_FROM_PKG" ]; then
echo "Version mismatch: Tag version $VERSION_FROM_TAG does not match package.json version $VERSION_FROM_PKG"
exit 1
fi
echo "Version $VERSION_FROM_PKG matches."
- name: Publish
run: npm publish -w @luzzle/web.tools