Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

build: automatically publish CLI along with release (#4523)

Bogdan Chadkin7f73ff59880c
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d1f0bd9a98..ee7b39bcd3 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -58,3 +58,34 @@ jobs:
name: tag_name,
body: changelog,
})
+
+ publish:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ github.ref }} # tag name
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: pnpm
+
+ - name: bump version to ${{ github.ref }}
+ run: pnpx replace-in-files-cli --string="0.191.0" --replacement="${{ github.ref }}" "**/package.json"
+
+ - name: pnpm instal
+ run: pnpm install --ignore-scripts
+ - run: pnpm -r build
+ - run: pnpm -r dts
+
+ - name: Creating .npmrc
+ run: |
+ cat << EOF > "$HOME/.npmrc"
+ //registry.npmjs.org/:_authToken=$NPM_TOKEN
+ EOF
+ env:
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ - run: pnpm -r publish --access public --no-git-checks