Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release by 14.12.2023 #925

Merged
merged 50 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
f17b825
refactor(new-hope): tokens, variations, config
nikewht Nov 27, 2023
a7b1fe1
chore: use "@auto-it" config as js file
Yakutoc Nov 29, 2023
a93a8cc
chore: add "auto-plugins:build" script
Yakutoc Nov 29, 2023
1a6b86f
ci: handling upload assets
Yakutoc Nov 29, 2023
fe59d0d
ci(publish): handling outputs dispatch HAS_ASSETS [skip ci]
Yakutoc Dec 5, 2023
a3b08ce
chore(plasma-b2c): fix typo
Yakutoc Dec 5, 2023
50d78f8
fix: Fix typo
Yakutoc Dec 5, 2023
282267f
Update versions
Salute-Eva Dec 5, 2023
887b741
Update package-lock.json files
Salute-Eva Dec 5, 2023
182c49b
feat(plasma-new-hope): add general addFocusMixin
TitanKuzmich Dec 4, 2023
e3ad790
feat(plasma-new-hope): replace local addFocus on general
TitanKuzmich Dec 4, 2023
d3668fc
feat(plasma-new-hope): replace local addFocus on general in radiobox
TitanKuzmich Dec 4, 2023
ba6ff01
feat(plasma-new-hope): replace local addFocus on general in chip
TitanKuzmich Dec 4, 2023
e1f9905
feat(plasma-asdk): reexport addFocus from new-hope
TitanKuzmich Dec 4, 2023
3b2c584
feat(plasma-new-hope): replace local addFocus on general in calendar
TitanKuzmich Dec 7, 2023
36c05d8
Update versions
Salute-Eva Dec 8, 2023
ea6100e
ci(node): freeze node version
Yakutoc Dec 11, 2023
4ee28cd
Update package-lock.json files
Salute-Eva Dec 11, 2023
6d042aa
ci: computed condition for upload assets when publish RC
Yakutoc Dec 5, 2023
fd433c5
chore(plasma-tokens-native): fix typo
Yakutoc Dec 13, 2023
a5b022f
ci(changelog): generate changelog and create release pull request
Yakutoc Nov 30, 2023
0929877
ci: update pull request template
Yakutoc Dec 6, 2023
8e3b196
feat(plasma-new-hope): add header as separate components
TitanKuzmich Dec 3, 2023
041144f
feat(plasma-asdk): remove List & ListItem
TitanKuzmich Dec 4, 2023
d899ee6
docs(plasma-asdk): regenerate api report
TitanKuzmich Dec 4, 2023
959ea61
feat(plasma-asdk): add Header components & mediaQuery mixin
TitanKuzmich Dec 4, 2023
4a0ad23
feat(plasma-asdk/new-hope): move tokens for button in token file
TitanKuzmich Dec 6, 2023
de7607e
feat(plasma-new-hope): remove media-query from root
TitanKuzmich Dec 8, 2023
6f710a6
Update versions
Salute-Eva Dec 13, 2023
86715a7
chore: update package locks
TitanKuzmich Dec 9, 2023
6b69a9e
ci(docs): add storybook for "Plasma-ASDK"
Yakutoc Dec 12, 2023
b68554f
ci(changelog): refactoring
Yakutoc Dec 13, 2023
d5cd408
chore: refactoring pull request template
Yakutoc Dec 13, 2023
c385d1b
feat(plasma-new-hope): Tooltip added
kayman233 Nov 29, 2023
f63b3cd
feat(plasma-new-hope, plasma-web, plasma-b2c): Tooltip added
kayman233 Dec 5, 2023
3b66192
fix(plasma-new-hope): Tooltip, Popover, Dropdown refactor
kayman233 Dec 7, 2023
28a5034
fix(plasma-new-hope): fix tokens usage in Tooltip
kayman233 Dec 8, 2023
8e901fb
Update versions
Salute-Eva Dec 13, 2023
71a27d4
Update package-lock.json files
Salute-Eva Dec 13, 2023
59a143a
fix(plasma-theme-builder): Add resoterd color methods for generate th…
neretin-trike Dec 9, 2023
4b79a40
Update versions
Salute-Eva Dec 13, 2023
a7bfecc
feat(plasma-new-hope): Add core Switch component
Oct 18, 2023
4cfddf8
refactor(plasma-new-hope): rewrite Switch
Yeti-or Nov 30, 2023
01d7ff7
feat(plasma-web): Replace from plasma-new-hope
Yeti-or Dec 1, 2023
6fde94d
feat(plasma-b2c): Replace `Switch` from plasma-new-hope
Yeti-or Dec 1, 2023
cc7a237
feat(plasma-new-hope): Switch add labelPosition
Yeti-or Dec 14, 2023
ea19a3c
refactor(plasma-new-hope): sds: rewrite Switch
Yeti-or Nov 30, 2023
32dd9f7
feat(plasma-asdk): add Switch component
Yeti-or Dec 14, 2023
d354ab8
Update versions
Salute-Eva Dec 14, 2023
f9beff5
feat: update package-lock.json files
Salute-Eva Dec 14, 2023
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
29 changes: 0 additions & 29 deletions .autorc.json

This file was deleted.

43 changes: 37 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
## Release Notes
### Заголовок вносимых изменений (например Dropdown или CI) [Heading 3]

Короткое резюме вносимых изменений.
Здесь описываем резюме вносимых изменений.

### What/why Changed
В формате списка, например

- добавили новый api
- изменили свойство size

Пример такого описания, см. ниже

```md
### Raised hand

- добавлена новая иконка

<img width="48" alt="raisedHand" src="https://github.com/salute-developers/plasma/assets/46107741/212dbd44-1739-456e-83c3-e4362a2a10fd">
```

Примечания:

- По возможности приложите скриншоты решенной проблемы в формате "до/после" или скриншоты нового компонента.
- Обязательно укажите соответствующий **label**. Это нужно для определения правильной категории вносимых изменений.

### What/why changed

Более подробное описание решаемой проблемы.

По возможности приложите скриншоты решенной проблемы в формате "до/после".
### Labels

Это то, что **решает** ваш pull request. Label может быть только один.

Список доступных labels:

- Components (задача добавить новый компонент)
- Infra (поправили CI/CD, обновили зависимости, etc)
- Tokens (поправили в plasma-tokens, theme-builder)
- Icons (добавили новые иконки)
- Docs (задачи связанные с документацией)

Все что не попадает в вышеперечисленное, попадет в категорию Misc.

#### Прежде чем перевести в статус "requested a review" убедитесь
### Прежде чем перевести в статус "requested a review" убедитесь

- Добавлен номер issue (если есть);
- Добавлены/обновлены **cypress тесты** если PR касается визуальной составляющей;
- Поставлены соответствующие **label**, например если PR касается plasma-ui то и label должен быть соответствующий;
41 changes: 41 additions & 0 deletions .github/changelog-builder-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"categories": [
{
"title": "## Components",
"labels": ["plasma-components"]
},
{
"title": "## Icons",
"labels": ["plasma-icons"]
},
{
"title": "## Infra",
"labels": ["plasma-infra"]
},
{
"title": "## Tokens",
"labels": ["plasma-tokens"]
},
{
"title": "## Docs",
"labels": ["plasma-docs"]
},
{
"title": "## Misc",
"labels": []
}
],
"ignore_labels": ["changelog-skip"],
"pr_template": "#{{DESC}}\n#{{TITLE}} (#{{URL}})\n",
"custom_placeholders": [
{
"name": "DESC",
"source": "BODY",
"transformer": {
"pattern": "(?:\n### What/why changed)(.*)",
"flags": "s",
"target": " "
}
}
]
}
9 changes: 9 additions & 0 deletions .github/processing-scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ module.exports = () => {
return { SCOPE: [], HAS_SCOPE: false };
}

/**
* @example
* ['@salutejs/plasma-ui-docs', '@salutejs/plasma-ui', '@salutejs/plasma-core']
*/
const packagesList = changedState.map(({ name }) => name);

const HAS_PLASMA_UI_DOCS = packagesList.includes('@salutejs/plasma-ui-docs');
Expand All @@ -47,6 +51,10 @@ module.exports = () => {
const HAS_DOCUMENTATION_CHANGED =
HAS_PLASMA_WEBSITE || HAS_PLASMA_UI_DOCS || HAS_PLASMA_WEB_DOCS || HAS_PLASMA_TEMPLE_DOCS || HAS_PLASMA_ASDK;

// Флаг для управления логикой "@auto-it" плагина upload-assets-extend
// Изменения в plasma-tokens или plasma-tokens-utils так же повлияют на то что в packagesList окажется plasma-tokens-native
const HAS_ASSETS = packagesList.includes('@salutejs/plasma-tokens-native');

/**
* List short packages name
* @example
Expand Down Expand Up @@ -78,5 +86,6 @@ module.exports = () => {
HAS_PLASMA_TEMPLE,
HAS_PLASMA_HOPE,
HAS_PLASMA_ASDK,
HAS_ASSETS,
};
};
5 changes: 5 additions & 0 deletions .github/workflows/change-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ on:
HAS_PLASMA_ASDK:
description: ""
value: ${{ jobs.run.outputs.HAS_PLASMA_ASDK }}
HAS_ASSETS:
description: ""
value: ${{ jobs.run.outputs.HAS_ASSETS }}
PACKAGES_ENUMERATION:
description: ""
value: ${{ jobs.run.outputs.PACKAGES_ENUMERATION }}
Expand All @@ -71,6 +74,7 @@ jobs:
HAS_PLASMA_UI: ${{ steps.set-output.outputs.HAS_PLASMA_UI }}
HAS_PLASMA_HOPE: ${{ steps.set-output.outputs.HAS_PLASMA_HOPE }}
HAS_PLASMA_ASDK: ${{ steps.set-output.outputs.HAS_PLASMA_ASDK }}
HAS_ASSETS: ${{ steps.set-output.outputs.HAS_ASSETS }}
PACKAGES_ENUMERATION: ${{ steps.set-output.outputs.PACKAGES_ENUMERATION }}

steps:
Expand Down Expand Up @@ -121,5 +125,6 @@ jobs:
echo "HAS_PLASMA_UI=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_UI }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_HOPE=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_HOPE }}" >> $GITHUB_OUTPUT
echo "HAS_PLASMA_ASDK=${{ fromJSON(steps.scope.outputs.result).HAS_PLASMA_ASDK }}" >> $GITHUB_OUTPUT
echo "HAS_ASSETS=${{ fromJSON(steps.scope.outputs.result).HAS_ASSETS }}" >> $GITHUB_OUTPUT
echo "PACKAGES_ENUMERATION=${{ fromJSON(steps.scope.outputs.result).PACKAGES_ENUMERATION }}" >> $GITHUB_OUTPUT

28 changes: 24 additions & 4 deletions .github/workflows/documentation-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ jobs:
run: |
npm run storybook:build --prefix="./packages/plasma-b2c"
cp -R ./packages/plasma-b2c/build-sb ./s3_build_sb/b2c-storybook


- name: Plasma "ASDK" Storybook
run: |
npm run storybook:build --prefix="./packages/plasma-asdk"
cp -R ./packages/plasma-asdk/build-sb ./s3_build_sb/asdk-storybook

- name: Plasma Temple Storybook
run: |
npm run storybook:build --prefix="./packages/plasma-temple"
Expand All @@ -101,7 +106,7 @@ jobs:
./s3_build/next-${{ github.sha }}/
s3://${{ secrets.AWS_S3_BUCKET_2 }}/current/

- name: s3 Upload storybook build ui
- name: Upload to S3 storybook "Plasma-UI"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -116,7 +121,7 @@ jobs:
./s3_build_sb/ui-storybook/
s3://${{ secrets.AWS_S3_BUCKET_2 }}/ui-storybook/

- name: s3 Upload storybook build web
- name: Upload to S3 storybook "Plasma-Web"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -131,7 +136,7 @@ jobs:
./s3_build_sb/web-storybook/
s3://${{ secrets.AWS_S3_BUCKET_2 }}/web-storybook/

- name: s3 Upload storybook build b2c
- name: Upload to S3 storybook "Plasma-b2c"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -145,3 +150,18 @@ jobs:
sync
./s3_build_sb/b2c-storybook/
s3://${{ secrets.AWS_S3_BUCKET_2 }}/b2c-storybook/

- name: Upload to S3 storybook "Plasma-ASDK"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build_sb/asdk-storybook/
s3://${{ secrets.AWS_S3_BUCKET_2 }}/asdk-storybook/
11 changes: 10 additions & 1 deletion .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,22 @@ jobs:
authorize:
name: Authorize external pull request
uses: ./.github/workflows/authorize-external-pr.yml

scope:
name: Computed changed state
needs: [ authorize ]
uses: ./.github/workflows/change-detection.yml
with:
ref: refs/pull/${{github.event.pull_request.number}}/merge
secrets: inherit

publish:
name: Publish canary version
needs: [ authorize ]
needs: [ authorize, scope ]
uses: ./.github/workflows/publish-common.yml
with:
ref: refs/pull/${{github.event.pull_request.number}}/merge
upload_assets: ${{ needs.scope.outputs.HAS_ASSETS == 'true' }}
secrets:
gh_token: ${{ secrets.GH_TOKEN }}
npm_registry_token: ${{ secrets.NPM_REGISTRY_TOKEN }}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/publish-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
type: string
description: "Manual set repo ref"
default: ''
upload_assets:
type: boolean
default: false
secrets:
gh_token:
required: true
Expand Down Expand Up @@ -50,12 +53,15 @@ jobs:

- name: API Report
run: npm run api:report

- name: Build "@auto-it" plugins
run: npm run auto-plugins:build

- name: Release Info
run: npm whoami && npx lerna info && npx auto info || echo 'auto info returned 1'

- name: Create Release
run: npm run release
run: upload_assets="${{ inputs.upload_assets }}" npm run release

- name: Update package-lock files
if: ${{ inputs.with-update-package-lock }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
uses: ./.github/workflows/publish-common.yml
with:
with-update-package-lock: true
upload_assets: true
secrets:
gh_token: ${{ secrets.GH_TOKEN }}
npm_registry_token: ${{ secrets.NPM_REGISTRY_TOKEN }}
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/publish-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,70 @@ on:
- dev

jobs:
change-state:
if: ${{ github.actor == 'github-merge-queue[bot]' }}
name: Computed state of change
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
outputs:
HAS_ASSETS: ${{ steps.scope.outputs.result }}
steps:
## Получаем актуальное состояние dev branch
- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
fetch-depth: 0

- name: Prepare environment
uses: ./.github/actions/prepare-environment

## Получаем base sha commit из merged pull request который запустил это событие
## context.sha - это последний commit в dev ветку
## base.sha - это последний commit base branch до влития целевого pull request
- name: Get associated pull request by commit
id: sha
uses: actions/github-script@v6
with:
script: |
const res = await github.rest.repos.listPullRequestsAssociatedWithCommit({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
});

return res?.data[0]?.base?.sha || context.sha;

## Сохраняем вывод команды lerna ls в формате json array
- name: Preserve lerna ls state
id: lerna_ls
run: |
echo "STATE=$(npx lerna la --json --since=${{ steps.sha.outputs.result }} | jq -c)" >> "$GITHUB_OUTPUT"

## Высчитываем условие для загрузки assets
- name: Computed scope state
id: scope
uses: actions/github-script@v6
env:
CHANGED_STATE: ${{ toJSON(steps.lerna_ls.outputs.STATE) }}
with:
script: |
const processingScope = require('./.github/processing-scope.js');

const state = processingScope();

return state.HAS_ASSETS ?? false;

publish:
name: Publish RC version
needs: [ change-state ]
if: ${{ github.actor == 'github-merge-queue[bot]' }}
uses: ./.github/workflows/publish-common.yml
with:
with-update-package-lock: true
commit-message: "Update package-lock.json files"
upload_assets: ${{ needs.change-state.outputs.HAS_ASSETS == 'true' }}
secrets:
gh_token: ${{ secrets.GH_TOKEN }}
npm_registry_token: ${{ secrets.NPM_REGISTRY_TOKEN }}
Expand Down
Loading
Loading