Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,27 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build:lib
- name: Determine npm dist-tag
id: dist-tag
- name: Detect pre-release
id: meta
run: |
VERSION="${GITHUB_REF_NAME#v}"
if [[ "$VERSION" == *-alpha* ]]; then
echo "tag=alpha" >> "$GITHUB_OUTPUT"
elif [[ "$VERSION" == *-beta* ]]; then
echo "tag=beta" >> "$GITHUB_OUTPUT"
elif [[ "$VERSION" == *-rc* ]]; then
echo "tag=next" >> "$GITHUB_OUTPUT"
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 }}
# Pre-1.0: the newest release is what consumers should get by default, so
# every tag publishes to the `latest` dist-tag (npm's default). Revisit once
# a stable release needs its own pre-release channel — e.g. route betas to
# `next` and reserve `latest` for stable.
- run: npm publish ./dist/grapesjs-angular --access public --provenance --tag latest

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
PRERELEASE: ${{ steps.dist-tag.outputs.prerelease }}
PRERELEASE: ${{ steps.meta.outputs.prerelease }}
run: |
VERSION="${TAG#v}"
# Pull this version's section out of CHANGELOG.md (Keep a Changelog format):
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +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.
> **Pre-release:** the library is in beta — `npm install` gives you the newest beta (the `latest` tag tracks the most recent release until a stable `1.0`).

```bash
npm install @ilq/grapesjs-angular@beta grapesjs
npm install @ilq/grapesjs-angular grapesjs
```

Add the GrapesJS CSS to your project:
Expand Down