parent
82002b2803
commit
6904d6c7e6
5
.github/workflows/publish_release.yml
vendored
5
.github/workflows/publish_release.yml
vendored
|
|
@ -19,7 +19,12 @@ 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: utils/publish_all_packages.sh --release-candidate
|
||||||
|
if: "github.event.release.prerelease"
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
- run: utils/publish_all_packages.sh --release
|
- run: utils/publish_all_packages.sh --release
|
||||||
|
if: "!github.event.release.prerelease"
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ NPM_PUBLISH_TAG="next"
|
||||||
|
|
||||||
VERSION=$(node -e 'console.log(require("./package.json").version)')
|
VERSION=$(node -e 'console.log(require("./package.json").version)')
|
||||||
|
|
||||||
if [[ $1 == "--release" ]]; then
|
if [[ "$1" == "--release" ]]; then
|
||||||
if [[ -n $(git status -s) ]]; then
|
if [[ -n $(git status -s) ]]; then
|
||||||
echo "ERROR: git status is dirty; some uncommitted changes or untracked files"
|
echo "ERROR: git status is dirty; some uncommitted changes or untracked files"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -57,7 +57,18 @@ if [[ $1 == "--release" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
NPM_PUBLISH_TAG="latest"
|
NPM_PUBLISH_TAG="latest"
|
||||||
elif [[ $1 == "--next" ]]; then
|
elif [[ "$1" == "--release-candidate" ]]; then
|
||||||
|
if [[ -n $(git status -s) ]]; then
|
||||||
|
echo "ERROR: git status is dirty; some uncommitted changes or untracked files"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Ensure package version is properly formatted.
|
||||||
|
if [[ "${VERSION}" != *-rc* ]]; then
|
||||||
|
echo "ERROR: release candidate version must have a dash"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
NPM_PUBLISH_TAG="rc"
|
||||||
|
elif [[ "$1" == "--next" ]]; then
|
||||||
# Ensure package version contains dash.
|
# Ensure package version contains dash.
|
||||||
if [[ "${VERSION}" != *-* ]]; then
|
if [[ "${VERSION}" != *-* ]]; then
|
||||||
echo "ERROR: cannot publish release version with --next flag"
|
echo "ERROR: cannot publish release version with --next flag"
|
||||||
|
|
@ -65,7 +76,7 @@ elif [[ $1 == "--next" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
NPM_PUBLISH_TAG="next"
|
NPM_PUBLISH_TAG="next"
|
||||||
elif [[ $1 == "--beta" ]]; then
|
elif [[ "$1" == "--beta" ]]; then
|
||||||
# Ensure package version contains dash.
|
# Ensure package version contains dash.
|
||||||
if [[ "${VERSION}" != *-* ]]; then
|
if [[ "${VERSION}" != *-* ]]; then
|
||||||
echo "ERROR: cannot publish release version with --beta flag"
|
echo "ERROR: cannot publish release version with --beta flag"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue