Skip to content

Commit

Permalink
ci(publish): delete unnecessary manual version update
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakutoc committed Sep 20, 2023
1 parent 6709beb commit 6e4a494
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
41 changes: 0 additions & 41 deletions .github/actions/update-package-lock/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inputs:
description: 'Commit message when updated package-lock'
required: false
default: 'chore: update package-locks [skip ci]'
tag:
description: 'publish tag: canary,dev,latest. For example, tag === "dev" run => npm install @salutejs/plasma-b2c@dev'
required: false
token:
description: 'A Github Token'
required: true
Expand Down Expand Up @@ -39,41 +36,3 @@ runs:
branch: ${{ steps.branch_name.outputs.BRANCH }}
author_name: Salute Frontend Team
author_email: [email protected]

# [NOTE]: Временное решение.
# Как только научим plugin npm для auto изменять версии в приватных пакетах при публикации RC версии данный шаг будет удален
# Перечисленные пакеты приватные и у них нет в зависимостях приватных пакетов
# Если мы попробуем установить приватный пакет то получим ошибку
- name: Update dependencies versions in private packages by dev tag
if: ${{ inputs.tag == 'dev' }}
shell: bash
run: |
lerna_ls=$(npx lerna ls --json)
# Получаем и сохраняем версию пакета, например "@salutejs/[email protected]"
core=@salutejs/plasma-core@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-core" ) | .version')
tokens_b2b=@salutejs/plasma-tokens-b2b@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-tokens-b2b" ) | .version')
tokens_b2c=@salutejs/plasma-tokens-b2c@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-tokens-b2c" ) | .version')
tokens_web=@salutejs/plasma-tokens-web@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-tokens-web" ) | .version')
web=@salutejs/plasma-web@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-web" ) | .version')
tokens=@salutejs/plasma-tokens@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-tokens" ) | .version')
tokens_utils=@salutejs/plasma-tokens-utils@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-tokens-utils" ) | .version')
typo=@salutejs/plasma-typo@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-typo" ) | .version')
b2c=@salutejs/plasma-b2c@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-b2c" ) | .version')
icons=@salutejs/plasma-icons@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-icons" ) | .version')
colors=@salutejs/plasma-colors@$(echo $lerna_ls | jq -r -c '.[] | select( .name == "@salutejs/plasma-colors" ) | .version')
npm i $core $tokens_b2b $web --no-audit --no-progress --save-exact --prefix="./utils/plasma-docs-ui"
npm i $tokens $tokens_utils $typo --no-audit --no-progress --save-exact --prefix="./utils/plasma-tokens-native"
npm i $b2c $icons $tokens_b2c $typo --no-audit --no-progress --save-exact --legacy-peer-deps --prefix="./website/plasma-website"
npm i $b2c $colors $icons $tokens_b2b $tokens_b2c $tokens_utils $tokens_web $typo --no-audit --no-progress --save-exact --prefix="./website/plasma-theme-builder"
# [NOTE]: Временное решение.
- name: Commit & Push changes files
if: ${{ inputs.tag == 'dev' }}
uses: actions-js/push@master
with:
github_token: ${{ inputs.token }}
message: "Update versions"
branch: ${{ steps.branch_name.outputs.BRANCH }}
author_name: Salute Frontend Team
author_email: [email protected]
4 changes: 0 additions & 4 deletions .github/workflows/publish-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ on:
commit-message:
type: string
default: 'chore: update package-locks [skip ci]'
tag:
type: string
description: 'publish tag: canary,dev,latest. For example, tag === "dev" run => npm install @salutejs/plasma-b2c@dev'
secrets:
gh_token:
required: true
Expand Down Expand Up @@ -58,5 +55,4 @@ jobs:
uses: ./.github/actions/update-package-lock
with:
commit-message: ${{ inputs.commit-message }}
tag: ${{ inputs.tag }}
token: ${{ secrets.gh_token }}
1 change: 0 additions & 1 deletion .github/workflows/publish-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
with:
with-update-package-lock: true
commit-message: "chore: update package-locks"
tag: "dev"
secrets:
gh_token: ${{ secrets.GH_TOKEN }}
npm_registry_token: ${{ secrets.NPM_REGISTRY_TOKEN }}
Expand Down

0 comments on commit 6e4a494

Please sign in to comment.