From 0be90df662ee6a4bcd426705e842711c21d91317 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 5 Feb 2026 23:22:48 +0000 Subject: Update package.json and GitHub Actions workflow for version consistency - Changed the repository URL in package.json from SSH to HTTPS for better accessibility. - Updated the homepage URL in package.json to remove the #readme fragment. - Added a step in the GitHub Actions workflow to ensure that the tag matches the package version before publishing, enhancing version control integrity. --- .github/workflows/publish.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to '.github/workflows/publish.yml') diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fa7cf26..a6d3fa4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,6 +24,14 @@ jobs: cache-dependency-path: | package-lock.json playground/package-lock.json + - name: Check tag matches package version + run: | + VERSION=$(node -p "require('./package.json').version") + TAG="${GITHUB_REF_NAME}" + if [ "v${VERSION}" != "${TAG}" ]; then + echo "Tag ${TAG} does not match package.json version v${VERSION}" + exit 1 + fi - name: Write playground .env run: | printf '%s' "${{ secrets.PLAYGROUND_ENV_BASE64 }}" | base64 -d > playground/.env @@ -62,6 +70,14 @@ jobs: registry-url: https://registry.npmjs.org/ cache: "npm" cache-dependency-path: package-lock.json + - name: Check tag matches package version + run: | + VERSION=$(node -p "require('./package.json').version") + TAG="${GITHUB_REF_NAME}" + if [ "v${VERSION}" != "${TAG}" ]; then + echo "Tag ${TAG} does not match package.json version v${VERSION}" + exit 1 + fi - name: Install deps run: npm ci - name: Build plugin -- cgit v1.2.3