From 932376141ce196322f37695d3319b2b2879c199d Mon Sep 17 00:00:00 2001 From: Jan Amann Date: Thu, 20 Jun 2024 16:15:46 +0200 Subject: [PATCH] ci: Don't push canary releases (#1142) --- .github/workflows/prerelease.yml | 2 +- CONTRIBUTORS.md | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 2bddd0d2e..1a5012b13 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -23,7 +23,7 @@ jobs: - run: | git config --global user.name "${{ github.actor }}" git config --global user.email "${{ github.actor }}@users.noreply.github.com" - - run: pnpm run publish --conventional-prerelease --preid canary --dist-tag canary + - run: pnpm run publish --conventional-prerelease --preid canary --dist-tag canary --no-push if: "${{startsWith(github.event.head_commit.message, 'fix: ') || startsWith(github.event.head_commit.message, 'feat: ')}}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index cf6dd89af..b92a3ca88 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -80,7 +80,7 @@ This repository uses [action-semantic-pull-request](https://github.com/amannn/ac ## Releases -Releases are automated via Lerna. To determine the next version, [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) is used. +Releases are automated via [`lerna-light`](https://github.com/lerna-lite/lerna-lite). To determine the next version, [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) is used. ### Stable releases @@ -89,7 +89,7 @@ Every commit on `main` with the following prefixes will trigger a release: 1. `fix: `: Patch release 2. `feat: `: Minor release -Due to this, it's important to clean up commit messages of merged PRs since the commit title will appear in the changelog. Note that the PR title and description should be cleaned up by the person who initiates the merge since the PR is linked to from the changelog and should contain relevant details. We give credits to PR authors by linking them via `@{username}` in the commit title, which in turn creates a link in the changelog entry. +Due to this, it's important to clean up commit messages of merged PRs since the commit title will appear in the changelog. Note that the PR title and description should be cleaned up by the person who initiates the merge since the PR is linked to from the changelog & release and should contain relevant details. Note that the exclamation mark syntax (`!`) for indicating breaking changes is currently [not supported by Lerna](https://github.com/lerna/lerna/issues/2668#issuecomment-1467902595). Instead, a block like `BREAKING CHANGE: Dropped support for Node.js 12` should be added to the body of the commit message. @@ -104,3 +104,5 @@ Other prefixes that are allowed and will *not* create a release are the followin ### Prereleases Canary versions are automatically published on the `canary` branch. The prerelease version is determined based on the commit prefix (`fix`/`feat`). + +When merging from `canary` to `main`, a release will be triggered if new commits are added that use one of the release prefixes mentioned above. Note that the `canary` branch should also be merged to `main` via a pull request for documentation and review purposes.