devops: publish devrelease:npm to beta on release branches (#9949)
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
This commit is contained in:
parent
13cc266b37
commit
96d611ed7d
13
.github/workflows/publish_canary_npm.yml
vendored
13
.github/workflows/publish_canary_npm.yml
vendored
|
|
@ -23,11 +23,18 @@ jobs:
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npx playwright install-deps
|
- run: npx playwright install-deps
|
||||||
- run: node utils/build/update_canary_version.js --today-date
|
- name: Publish to NPM (@next)
|
||||||
if: contains(github.ref, 'master') && github.event_name != 'workflow_dispatch'
|
if: contains(github.ref, 'master') && github.event_name != 'workflow_dispatch'
|
||||||
- run: node utils/build/update_canary_version.js --commit-timestamp
|
run: |
|
||||||
|
node utils/build/update_canary_version.js --today-date
|
||||||
|
utils/publish_all_packages.sh --tip-of-tree
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
- name: Publish to NPM (@beta)
|
||||||
if: contains(github.ref, 'release') || github.event_name == 'workflow_dispatch'
|
if: contains(github.ref, 'release') || github.event_name == 'workflow_dispatch'
|
||||||
- run: utils/publish_all_packages.sh --tip-of-tree
|
run: |
|
||||||
|
node utils/build/update_canary_version.js --commit-timestamp
|
||||||
|
utils/publish_all_packages.sh --beta
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ if [[ $1 == "--help" ]]; then
|
||||||
echo
|
echo
|
||||||
echo "--release publish @latest version of all packages"
|
echo "--release publish @latest version of all packages"
|
||||||
echo "--tip-of-tree publish @next version of all packages"
|
echo "--tip-of-tree publish @next version of all packages"
|
||||||
|
echo "--beta publish @beta version of all packages"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -71,6 +72,14 @@ elif [[ $1 == "--tip-of-tree" ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
NPM_PUBLISH_TAG="next"
|
NPM_PUBLISH_TAG="next"
|
||||||
|
elif [[ $1 == "--beta" ]]; then
|
||||||
|
# Ensure package version contains dash.
|
||||||
|
if [[ "${VERSION}" != *-* ]]; then
|
||||||
|
echo "ERROR: cannot publish release version with --beta flag"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
NPM_PUBLISH_TAG="beta"
|
||||||
else
|
else
|
||||||
echo "unknown argument - '$1'"
|
echo "unknown argument - '$1'"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue