-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
194 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,68 @@ | ||
# This workflow will ensure all PRs are labeled so we can later create releases | ||
|
||
name: Prerelease | ||
|
||
on: | ||
- push | ||
- workflow_dispatch | ||
push: | ||
branches-ignore: | ||
- "master" | ||
|
||
jobs: | ||
prerelease: | ||
if: "github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[prerelease]')" | ||
if: "contains(github.event.head_commit.message, '[prerelease]')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: ./.github/actions/setup | ||
- name: Run Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
npm_token: ${{secrets.npm_token}} | ||
npm_token: ${{ secrets.npm_token }} | ||
- uses: ./.github/actions/git-creds | ||
- name: Check if there are changed packages | ||
id: changed-packages | ||
run: | | ||
changed_packages=$(yarn -s lerna ls --since=origin/master --json --loglevel=error) | ||
[[ $changed_packages = "[]" ]] && echo "No packages changed in this branch" && exit 1 || echo "Continuing to prerelease" | ||
[[ $changed_packages = "[]" ]] && echo "Skipping prerelease. Nothing to prerelease as Lerna didn't detect any changes." && exit 1 || echo "Changed detected. Continuing to prerelease" && echo "$changed_packages" | ||
- name: Build all affected packages | ||
run: yarn lerna run build --since=origin/master | ||
- name: Generate prerelease prefix | ||
run: | | ||
normalized_branch_name=$(git rev-parse --abbrev-ref HEAD | tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]') | ||
echo "BRANCH=$normalized_branch_name" >> $GITHUB_ENV | ||
run: yarn lerna run build --since=origin/master --include-dependencies | ||
- name: Generate new versions | ||
run: yarn lerna version --exact --conventional-commits --conventional-prerelease --no-changelog --no-push --preid $BRANCH -y | ||
id: generate-versions | ||
run: | | ||
preid=${{ github.ref_name }} | ||
normalized_pre_id=$(echo "$preid" | tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]') | ||
full_output=$(yarn lerna version --exact --conventional-commits --conventional-prerelease --json --no-changelog --no-push --preid "$normalized_pre_id" -y) | ||
# extract only the JSON portion from the full output, excluding yarn logs | ||
json_output=$(echo "$full_output" | awk '/^\[/{p=1} p; /\]/{p=0}' ) | ||
echo 'new_versions<<EOF' >> $GITHUB_OUTPUT | ||
echo "$json_output" >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
- run: yarn config set registry https://registry.npmjs.org/ | ||
- name: Setup .npmrc for publish | ||
run: npm set "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | ||
- run: npm whoami | ||
NODE_AUTH_TOKEN: ${{ secrets.npm_token }} | ||
- name: Publish new versions | ||
run: yarn lerna publish from-package --dist-tag $BRANCH -y | ||
run: yarn lerna publish from-package --dist-tag prerelease -y | ||
- name: Get current PR id | ||
uses: 8BitJonny/gh-get-current-pr@2.2.0 | ||
uses: 8BitJonny/gh-get-current-pr@3.0.0 | ||
id: PR | ||
if: success() | ||
- name: Create comment with prerelease version details | ||
if: success() | ||
uses: peter-evans/create-or-update-comment@v1 | ||
- name: Prepare PR comment | ||
id: prepare-comment | ||
env: | ||
BRANCH: ${{ github.ref_name }} | ||
with: | ||
issue-number: ${{ steps.PR.outputs.number }} | ||
body: | | ||
A new prerelease version of this PR has been published! 🎉 | ||
json_data: ${{ steps.generate-versions.outputs.new_versions }} | ||
run: | | ||
echo 'comment_body<<EOF' >> $GITHUB_OUTPUT | ||
To install this prerelease version, run the following command in your terminal with any one of the packages changed in this PR: | ||
``` | ||
npm i <package_name>@${{ env.BRANCH }} | ||
``` | ||
echo "A new prerelease version of this PR has been published! 🎉" >> $GITHUB_OUTPUT | ||
echo "To install this prerelease version, run the following command in your terminal with any one of the packages changed in this PR:" >> $GITHUB_OUTPUT | ||
Or: | ||
``` | ||
yarn add <package_name>@${{ env.BRANCH }} | ||
``` | ||
echo "$json_data" | jq -r '.[] | "\nTo update `\(.name)`:\n```\nyarn add \(.name)@\(.newVersion)\n```\nOr with npm:\n```\nnpm i \(.name)@\(.newVersion)\n```\n"' >> $GITHUB_OUTPUT | ||
For example: | ||
``` | ||
yarn add monday-ui-react-core@${{ env.BRANCH }} | ||
``` | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
- name: Create comment with prerelease version details | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
issue-number: ${{ steps.PR.outputs.number }} | ||
body: ${{ steps.prepare-comment.outputs.comment_body }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,22 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
# [2.94.0](https://github.com/mondaycom/monday-ui-react-core/compare/[email protected]@2.94.0) (2024-03-05) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **TableHeaderCell:** change hover color ([#1888](https://github.com/mondaycom/monday-ui-react-core/issues/1888)) ([c057a2e](https://github.com/mondaycom/monday-ui-react-core/commit/c057a2e83d2d3fb62c05e29ab768f44a77045fe9)) | ||
|
||
|
||
### Features | ||
|
||
* **Flex:** new align's value - baseline ([#1989](https://github.com/mondaycom/monday-ui-react-core/issues/1989)) ([224be04](https://github.com/mondaycom/monday-ui-react-core/commit/224be042e0265740d174f995e290f3cefa36ed1b)) | ||
|
||
|
||
|
||
|
||
|
||
# [2.93.0](https://github.com/mondaycom/monday-ui-react-core/compare/[email protected]@2.93.0) (2024-02-28) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.