diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9d76f2f..254b2a3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,7 +7,7 @@ jobs: publish: runs-on: ubuntu-latest permissions: - contents: read + contents: write id-token: write steps: - uses: actions/checkout@v6 @@ -31,4 +31,33 @@ jobs: else echo "tag=latest" >> "$GITHUB_OUTPUT" fi + # Any SemVer pre-release identifier (the hyphen) marks a GitHub pre-release + if [[ "$VERSION" == *-* ]]; then + echo "prerelease=true" >> "$GITHUB_OUTPUT" + else + echo "prerelease=false" >> "$GITHUB_OUTPUT" + fi - run: npm publish ./dist/grapesjs-angular --access public --provenance --tag ${{ steps.dist-tag.outputs.tag }} + + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ github.ref_name }} + PRERELEASE: ${{ steps.dist-tag.outputs.prerelease }} + run: | + VERSION="${TAG#v}" + # Pull this version's section out of CHANGELOG.md (Keep a Changelog format): + # everything between this "## [x.y.z]" heading and the next "## [" heading. + awk -v ver="$VERSION" ' + $0 ~ "^## \\[" ver "\\]" { flag=1; next } + flag && /^## \[/ { exit } + flag { print } + ' CHANGELOG.md > release-notes.md + if [ ! -s release-notes.md ]; then + echo "No CHANGELOG entry for $VERSION — falling back to auto-generated notes." + FLAGS=(--generate-notes) + else + FLAGS=(--notes-file release-notes.md) + fi + [ "$PRERELEASE" = "true" ] && FLAGS+=(--prerelease) + gh release create "$TAG" --title "$TAG" --verify-tag "${FLAGS[@]}" diff --git a/CHANGELOG.md b/CHANGELOG.md index cc50061..f8052ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ## [2.0.0-beta.2] — 2026-06-21 +This release restructures the library to mirror [`@grapesjs/react`](https://github.com/GrapesJS/react), the official React wrapper. A new **custom-UI provider model** lets you compose the entire editor shell — sidebars, blocks, layers, style/trait panels — from Angular templates instead of GrapesJS's built-in panels, reaching feature parity with the React render-props API. **Contains breaking changes vs `2.0.0-beta.1`** (see _Changed_). + ### Added - `` mount-point component enabling custom UI mode — when projected into ``, swaps the editor's default container and disables default panels. diff --git a/README.md b/README.md index 7adc379..a40e89f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ An Angular wrapper for the [GrapesJS](https://grapesjs.com/) web builder framework. Embed a fully functional drag-and-drop page editor in your Angular app with all GrapesJS managers accessible as Angular signals. -**[Live Demo →](https://internetliquid.github.io/grapesjs-angular/)** +**[Live Demo →](https://internetliquid.github.io/grapesjs-angular/)** · **[npm package →](https://www.npmjs.com/package/@ilq/grapesjs-angular)** ## Angular Version Support @@ -20,8 +20,10 @@ An Angular wrapper for the [GrapesJS](https://grapesjs.com/) web builder framewo ## Installation +> **Pre-release:** the newest build ships under the npm `beta` dist-tag. Install with `@beta` to get it — a plain `npm install` currently resolves to an older beta. + ```bash -npm install @ilq/grapesjs-angular grapesjs +npm install @ilq/grapesjs-angular@beta grapesjs ``` Add the GrapesJS CSS to your project: