Skip to content

Commit

Permalink
Merge pull request #368 from VKCOM/imirdzhamolov/fix/publish-setup-ya…
Browse files Browse the repository at this point in the history
…rnrc-correct-way

fix(ci): setup yarnrc for publish with correct way
  • Loading branch information
evg-evdokimov authored Jun 21, 2023
2 parents f36b5ee + 993a19b commit 01880b7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/actions/publish-workflow-1-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ runs:
with:
node-version: 18
cache: 'yarn'
always-auth: true
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: YARN_ENABLE_SCRIPTS=false yarn install
Expand Down
7 changes: 4 additions & 3 deletions .github/actions/publish-workflow-4-complete/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ runs:
github_token: ${{ inputs.token }}
branch: ${{ inputs.branch }}

- name: Prepare NPM credentials
- name: Setup NPM Auth Token to .yarnrc.yml
run: |
echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml
yarn config set npmAlwaysAuth true
yarn config set npmAuthToken $NPM_AUTH_TOKEN
env:
NODE_AUTH_TOKEN: ${{ inputs.npm_token }}
NPM_AUTH_TOKEN: ${{ inputs.npm_token }}
shell: bash

- name: Publish release of ${{ inputs.package_name }}
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ coverage

# Yarn
.yarn/*
## yarn itself formats the file
.yarnrc.yml
6 changes: 5 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
nodeLinker: node-modules

npmPublishAccess: public

npmRegistryServer: "https://registry.npmjs.org"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.0.cjs

0 comments on commit 01880b7

Please sign in to comment.