Skip to content

docs: link to cloud providers guide in README comparison table (#298) #57

docs: link to cloud providers guide in README comparison table (#298)

docs: link to cloud providers guide in README comparison table (#298) #57

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- 'v*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
env:
# Publish order respects dependencies: inspector before mobilewright, etc.
PACKAGES: protocol mobilewright-core inspector driver-mobilecli driver-mobilenext mobilewright test
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 24
registry-url: https://registry.npmjs.org
- name: Set version from tag
run: node utils/set-versions.js ${GITHUB_REF_NAME#v}
- run: npm ci --ignore-scripts
- run: npm audit
- run: npm run build
- run: cp README.md packages/mobilewright/README.md
- run: cp README.md packages/test/README.md
- name: Dry run all packages (gate — abort if any fails)
run: |
for pkg in $PACKAGES; do
echo "::group::dry-run $pkg"
npm publish --access public --dry-run --workspace "packages/$pkg"
echo "::endgroup::"
done
- name: Publish all packages
run: |
for pkg in $PACKAGES; do
echo "::group::publish $pkg"
npm publish --access public --provenance --workspace "packages/$pkg"
echo "::endgroup::"
done
- name: Create or update GitHub release
run: |
VERSION=${GITHUB_REF_NAME#v}
sed -n "/^## \[$VERSION\]/,/^## \[/{ /^## \[$VERSION\]/p; /^## \[/!p; }" CHANGELOG.md > release-notes.md
if gh release view "$GITHUB_REF_NAME" &>/dev/null; then
gh release edit "$GITHUB_REF_NAME" --notes-file release-notes.md
else
gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file release-notes.md
fi
env:
GH_TOKEN: ${{ github.token }}