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.
This commit is contained in:
16
.github/workflows/publish.yml
vendored
16
.github/workflows/publish.yml
vendored
@@ -24,6 +24,14 @@ jobs:
|
|||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
package-lock.json
|
package-lock.json
|
||||||
playground/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
|
- name: Write playground .env
|
||||||
run: |
|
run: |
|
||||||
printf '%s' "${{ secrets.PLAYGROUND_ENV_BASE64 }}" | base64 -d > playground/.env
|
printf '%s' "${{ secrets.PLAYGROUND_ENV_BASE64 }}" | base64 -d > playground/.env
|
||||||
@@ -62,6 +70,14 @@ jobs:
|
|||||||
registry-url: https://registry.npmjs.org/
|
registry-url: https://registry.npmjs.org/
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
cache-dependency-path: package-lock.json
|
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
|
- name: Install deps
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Build plugin
|
- name: Build plugin
|
||||||
|
|||||||
@@ -69,11 +69,11 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+ssh://git@code.popov.link/valentineus/strapi-plugin-checkbox-list.git"
|
"url": "https://code.popov.link/valentineus/strapi-plugin-checkbox-list.git"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://code.popov.link/valentineus/strapi-plugin-checkbox-list/issues"
|
"url": "https://code.popov.link/valentineus/strapi-plugin-checkbox-list/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://code.popov.link/valentineus/strapi-plugin-checkbox-list#readme",
|
"homepage": "https://code.popov.link/valentineus/strapi-plugin-checkbox-list",
|
||||||
"author": "Valentin Popov <valentin@popov.link>"
|
"author": "Valentin Popov <valentin@popov.link>"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user