Skip to content
Merged
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
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ jobs:
run: scripts/smoke-npm.sh dist/npm linux-x64 "$VERSION"
env:
VERSION: ${{ needs.build.outputs.version }}
# Publishing authenticates with this job's OIDC token through npm trusted publishing, so
# there is no npm token. Each package trusts this repo's release.yml on npmjs.com.
- name: Check npm supports trusted publishing
run: |
need=11.5.1
have=$(npm --version)
if [[ "$(printf '%s\n' "$need" "$have" | sort -V | head -1)" != "$need" ]]; then
echo "::error::npm $have can't use trusted publishing, which needs npm $need or later"
exit 1
fi
- name: Publish the platform packages, then patchbook
run: |
tag=latest
Expand All @@ -161,12 +171,11 @@ jobs:
echo "$name@$VERSION is already published"
return
fi
npm publish "$1" --provenance --access public --tag "$tag"
npm publish "$1" --access public --tag "$tag"
}
for dir in dist/npm/*/; do
[[ "$dir" == dist/npm/patchbook/ ]] || publish "${dir%/}"
done
publish dist/npm/patchbook
env:
VERSION: ${{ needs.build.outputs.version }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading