diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bb4c8834..2f8c074bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - name: check commit name + id: vars run: | COMMIT_MSG="${{ github.event.head_commit.message }}" COMMIT_TITLE="${COMMIT_MSG%%$'\n'*}" @@ -22,6 +23,39 @@ jobs: PACKAGE_VERSION="${PACKAGE_VERSION#v}" PACKAGE_VERSION="${PACKAGE_VERSION%% *}" echo "${PACKAGE_VERSION}" + echo version=${PACKAGE_VERSION} >> $GITHUB_OUTPUT else echo "did not match" fi + - name: check package versions + run: | + if node ./bump-versions.mjs ${{ steps.vars.outputs.version }} &> temp-bump-versions.txt + then + echo "Package versions did not match ${{ steps.vars.outputs.version }}." + exit 1 + fi + if [[ + grep -zq '...bumping studio-plugin\nnpm ERR! Version not changed' temp-bump-versions.txt && + grep -zq '...bumping studio-ui\nnpm ERR! Version not changed' temp-bump-versions.txt && + grep -zq '...bumping studio\nnpm ERR! Version not changed' temp-bump-versions.txt + ]] + then + if git diff --exit-code + then + exit 0 + fi + echo "Found unexpected git diff from running the bump-versions.mjs script." + exit 1 + fi + cat temp-bump-versions.txt + exit 1 + - name: check linting + run: | + npm run autofix + if git diff --exit-code + exit 0 + fi + echo "Found unexpected git diff from running `npm run autofix`." + exit 1 + - name: run tests + uses: ./.github/workflows/run-tests.yml diff --git a/bump-versions.mjs b/bump-versions.mjs index 4550dba14..8b6e561c6 100644 --- a/bump-versions.mjs +++ b/bump-versions.mjs @@ -25,8 +25,18 @@ function readJson(filepath) { } function main() { - bumpPackage("studio-plugin"); - bumpPackage("studio-ui"); + try { + bumpPackage("studio-plugin"); + } catch (e) { + console.error(e) + } + + try { + bumpPackage("studio-ui"); + } catch (e) { + console.error(e) + } + bumpStudio(); } diff --git a/package-lock.json b/package-lock.json index 647f3f318..e19a38ff7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25277,11 +25277,11 @@ }, "packages/studio": { "name": "@yext/studio", - "version": "0.27.0-alpha.1", + "version": "0.27.0", "dependencies": { "@vitejs/plugin-react": "^4.0.4", - "@yext/studio-plugin": "0.27.0-alpha.1", - "@yext/studio-ui": "0.27.0-alpha.1", + "@yext/studio-plugin": "0.27.0", + "@yext/studio-ui": "0.27.0", "autoprefixer": "^10.4.14", "cac": "^6.7.14", "cross-env": "^7.0.3", @@ -25301,7 +25301,7 @@ }, "packages/studio-plugin": { "name": "@yext/studio-plugin", - "version": "0.27.0-alpha.1", + "version": "0.27.0", "dependencies": { "@babel/parser": "^7.21.8", "@babel/preset-env": "^7.22.4", @@ -27416,7 +27416,7 @@ }, "packages/studio-ui": { "name": "@yext/studio-ui", - "version": "0.27.0-alpha.1", + "version": "0.27.0", "dependencies": { "@dhmk/zustand-lens": "^2.0.5", "@minoru/react-dnd-treeview": "^3.4.1", diff --git a/packages/studio-plugin/package.json b/packages/studio-plugin/package.json index b1a06185a..fb802f5bf 100644 --- a/packages/studio-plugin/package.json +++ b/packages/studio-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@yext/studio-plugin", - "version": "0.27.0-alpha.1", + "version": "0.27.0", "types": "./lib/index.d.ts", "main": "./lib/index.js", "type": "module", diff --git a/packages/studio-ui/package.json b/packages/studio-ui/package.json index 66d2ccf2e..1619b1191 100644 --- a/packages/studio-ui/package.json +++ b/packages/studio-ui/package.json @@ -1,6 +1,6 @@ { "name": "@yext/studio-ui", - "version": "0.27.0-alpha.1", + "version": "0.27.0", "types": "./lib/src/index.d.ts", "main": "./lib/src/index.js", "type": "module", diff --git a/packages/studio/package.json b/packages/studio/package.json index ffaf0ff82..0e85e8a06 100644 --- a/packages/studio/package.json +++ b/packages/studio/package.json @@ -1,6 +1,6 @@ { "name": "@yext/studio", - "version": "0.27.0-alpha.1", + "version": "0.27.0", "types": "./lib/types.d.ts", "type": "module", "bin": { @@ -14,8 +14,8 @@ }, "dependencies": { "@vitejs/plugin-react": "^4.0.4", - "@yext/studio-plugin": "0.27.0-alpha.1", - "@yext/studio-ui": "0.27.0-alpha.1", + "@yext/studio-plugin": "0.27.0", + "@yext/studio-ui": "0.27.0", "autoprefixer": "^10.4.14", "cac": "^6.7.14", "cross-env": "^7.0.3",