From bb1ac871af95691567326633afec70bb4fd8b4b2 Mon Sep 17 00:00:00 2001 From: markuczy <129275100+markuczy@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:43:40 +0100 Subject: [PATCH 1/2] feat: README update (#620) --- README.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 19e05d08..24d9072b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,52 @@ OneCx portal UI libraries [Changelog](CHANGELOG.md) +# Release configuration + +OneCX Portal UI Libs is using https://semantic-release.gitbook.io/semantic-release[semantic-release]for packages release. In this repository the following branches are important in context of making new releases: + +- **main** - contains source code for `latest` distribution tag. +- **develop** - contains source code for `rc` distribution tag with features for future release of OneCX. + +# Releasing libs + +The `main` branch contains the source code for the `latest` distribution tag of OneCX libraries. In order to release new version of libs, use `create-release` action to run the release workflow for **main branch**. + +## Release versioning + +Depending on the commits included for a release in the `main` branch, the version of the `latest` distribution tag varies. Below, a list of example version changes is presented: + +- Release fix commit - The patch version increments (e.g., `5.1.3` → `5.1.4`). +- Release feat commit - The minor version increments (e.g., `5.1.3` → `5.2.0`). +- Release commit with breaking change - The major version increments (e.g., `5.1.3` → `6.0.0`). +- Release changes merged from pre-release branch - The major version increments (e.g., `5.1.3` → `6.0.0`). + +# Pre-releases + +The https://semantic-release.gitbook.io/semantic-release[semantic-release] allows to create pre-releases. In this repository, `develop` branch should contain source code which could be released as a release candidate. + +In order to release new version of pre-release (`rc` distribution tag) of OneCX libraries, use `create-release` action to run the release workflow for **develop branch**. + +## Pre-release versioning + +Depending on the commits included for a release in the `develop` branch, the version of the `rc` distribution tag varies. Below, a list of example version changes is presented: + +- Release fix commit - The patch version increments (e.g., `6.0.0-rc.3` → `6.0.0-rc.4`). +- Release feat commit - The minor version increments (e.g., `6.0.0-rc.3` → `6.0.0-rc.4`). +- Release commit with breaking change - The major version increments (e.g., `6.0.0-rc.3` → `7.0.0-rc.1`). +- Release changes merged from pre-release branch - The major version increments (e.g., `6.0.0-rc.3` → `7.0.0-rc.1`). + +To find out more on pre-releases with semantic-release, please refer https://semantic-release.gitbook.io/semantic-release/recipes/release-workflow/pre-releases[here]. + +# Porting changes from main to develop + +In some cases, there might be a requirement to make a change directly on a main branch (e.g., urgent fix for a client). In that scenario, the following should happen: + +- Change is prepared on the `main` branch +- Libs are released via the `main` branch +- The `main` branch is merged into `develop` branch +- Libs pre-release is released via the `develop` branch + # Update from v3 to v4 guide -[Update guide](update-guide.md) \ No newline at end of file +[Update guide](update-guide.md) From 3f3da6001ed409b909ec80478ec8fa392ada67cf Mon Sep 17 00:00:00 2001 From: markuczy <129275100+markuczy@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:46:40 +0100 Subject: [PATCH 2/2] feat: add CI and storybook to develop (#622) --- .github/workflows/ci.yml | 7 ++++--- .github/workflows/storybook-build-fork.yml | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96aabed5..3dc4b5aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,12 +2,13 @@ name: build on: push: branches: - - "*" - - "*/*" - - "**" + - '*' + - '*/*' + - '**' pull_request: branches: - main + - develop - v3 jobs: main: diff --git a/.github/workflows/storybook-build-fork.yml b/.github/workflows/storybook-build-fork.yml index 4a08615f..88b94f5f 100644 --- a/.github/workflows/storybook-build-fork.yml +++ b/.github/workflows/storybook-build-fork.yml @@ -1,8 +1,9 @@ name: Build Storybook (Fork) -on: +on: pull_request: - branches: - - 'main' + branches: + - 'main' + - 'develop' jobs: build-storybooks: runs-on: ubuntu-latest @@ -20,6 +21,5 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v4 with: - name: storybook-dist - path: dist/storybook/ - + name: storybook-dist + path: dist/storybook/