Skip to content

Commit 4f9b8a7

Browse files
Fixing issue where workspace path doesnt exist in npm publish action (#570)
Trying to also fix issues with the changelog update perms.
1 parent e255bc0 commit 4f9b8a7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/changesets-publish-npm-packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
id: query-packages
2525
run: |
2626
# get all publishable npm packages
27-
public_packages=$(jq -r '.workspaces[]' package.json | xargs -I {} jq -c --arg path "{}" ' select(.private != true) | { path: $path, name: .name, version: .version }' {}/package.json)
27+
public_packages=$(jq -r '.workspaces[]' package.json | xargs -I {} bash -c 'if [ -f "{}/package.json" ]; then jq -c --arg path "{}" "select(.private != true) | { path: \$path, name: .name, version: .version }" {}/package.json; fi')
2828
to_publish=()
2929
# filter out packages with older or matching versions to the published version
3030
for row in $public_packages; do

.github/workflows/changesets-update-changelogs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
name: Release
1414
runs-on: ubuntu-latest
1515
permissions:
16+
contents: write
1617
pull-requests: write
1718
steps:
1819
- name: Checkout Repo

0 commit comments

Comments
 (0)