Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion .github/workflows/release_workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ jobs:
- name: publish
run: |
yarn config set -H 'npmAuthToken' "${{ secrets.RHDH_NPM_TOKEN }}"
yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish
YARN_VERSION="$(yarn --version)"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: How about create one reusable step or function for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a nice idea! but I was thinking that it would be better to make minimal changes in this PR. Especially because I'm touching the release workflow files :)

if [[ "$YARN_VERSION" == 4.* ]]; then
yarn workspaces foreach -A -v --no-private npm publish --access public --tolerate-republish
else
yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.RHDH_NPM_TOKEN }}

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release_workspace_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ jobs:
- name: publish
run: |
yarn config set -H 'npmAuthToken' "$NODE_AUTH_TOKEN"
yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish --tag "maintenance"
YARN_VERSION="$(yarn --version)"
if [[ "$YARN_VERSION" == 4.* ]]; then
yarn workspaces foreach -A -v --no-private npm publish --access public --tolerate-republish --tag "maintenance"
else
yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish --tag "maintenance"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.RHDH_NPM_TOKEN }}

Expand Down