diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index bd891d15..f682eea1 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -6,12 +6,6 @@ on: - main paths: - 'docs/**' - - 'js/**' - - 'less/**' - - 'sass/**' - - 'Gruntfile.js' - - 'package.json' - - 'package-lock.json' - '.github/workflows/deploy-docs.yml' workflow_dispatch: diff --git a/.github/workflows/publish_npm_release.yml b/.github/workflows/publish_npm_release.yml index fbedbc34..502cd3bf 100644 --- a/.github/workflows/publish_npm_release.yml +++ b/.github/workflows/publish_npm_release.yml @@ -27,8 +27,20 @@ jobs: node-version: '20.19' cache: 'npm' registry-url: 'https://registry.npmjs.org' + scope: '@crestapps' always-auth: true + - name: Validate npm publish prerequisites + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + npm whoami + PACKAGE_NAME=$(node -p "require('./package.json').name") + if [[ "$PACKAGE_NAME" != @* ]] && ! npm view "$PACKAGE_NAME" version >/dev/null 2>&1; then + echo "::error title=Initial unscoped npm publish requires a different token::Package '$PACKAGE_NAME' does not exist on npm yet. First-time publish of a new unscoped package usually cannot be done with an npm automation token from GitHub Actions. Publish it once manually with an npm publish-capable user token/session, or rename it to a scoped package and retry." + exit 1 + fi + - name: Build assets run: | npm ci diff --git a/CHANGELOG.md b/CHANGELOG.md index ef18ccb4..6d5b38e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# v1.0.0 (CrestApps fork) +# v1.0.1 (CrestApps fork) This is the first release of the CrestApps fork of [snapappointments/bootstrap-select](https://github.com/snapappointments/bootstrap-select). diff --git a/README.md b/README.md index 29945603..c239f91b 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ License - - npm version + + npm version Documentation @@ -41,10 +41,10 @@ following goals: ## Quick start -Install with [npm](https://www.npmjs.com/package/crestapps-bootstrap-select): +Install with [npm](https://www.npmjs.com/package/@crestapps/bootstrap-select): ```sh -npm install crestapps-bootstrap-select bootstrap +npm install @crestapps/bootstrap-select bootstrap ``` Load Bootstrap 5, then bootstrap-select's CSS and JS. **Load bootstrap-select @@ -73,9 +73,9 @@ jsDelivr. Prefer pinning an explicit package version in production: - - - + + + ``` You can replace `@1.0.0` with the version you want to consume. During @@ -86,7 +86,7 @@ When loaded via a ` - - - + + + ``` -You can replace `@1.0.0` with the version you want to consume. During development, +You can replace `@1.0.1` with the version you want to consume. During development, `@latest` also works, but a fixed version is safer for production deployments. When loaded via a `