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.

fix: gh action

Andras Bacsaid3ad9dbf080b
diff --git a/.github/actions/publish/action.yaml b/.github/actions/publish/action.yaml
index 24a129d324..9075de4664 100644
--- a/.github/actions/publish/action.yaml
+++ b/.github/actions/publish/action.yaml
@@ -1,9 +1,16 @@
name: 'Release NPM package'
description: 'Release NPM package'
inputs:
- package:
- description: 'Package.json location (relative)'
- default: 'package.json'
+ skip-build:
+ description: 'Skip build phase (useful for only configuration files)'
+ default: ''
+ filter:
+ description: 'Filter build phase by turbo'
+ default: ''
+ required: true
+ workdir:
+ description: 'Work directory for NPM publish'
+ default: '.'
required: true
token:
description: 'NPM Token'
@@ -16,13 +23,16 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: 16
- - name: Install Dependencies
+ registry-url: 'https://registry.npmjs.org'
+ - name: Install dependencies and build 🔧
run: yarn install
shell: bash
- - uses: JS-DevTools/npm-publish@v1
- with:
- token: ${{ inputs.token }}
- dry-run: false
- check-version: true
- access: 'public'
- package: ${{ inputs.package }}
\ No newline at end of file
+ - name: Build 🔧
+ if: ${{ inputs.skip-build == '' }}
+ run: yarn build --filter ${{ inputs.filter }}
+ shell: bash
+ - name: Publish package on NPM 📦
+ run: npm publish -w ${{ inputs.workdir }} --dry-run
+ shell: bash
+ env:
+ NODE_AUTH_TOKEN: ${{ inputs.token }}
\ No newline at end of file
diff --git a/.github/workflows/asset-uploader.yml b/.github/workflows/asset-uploader.yml
new file mode 100644
index 0000000000..6169db3850
--- /dev/null
+++ b/.github/workflows/asset-uploader.yml
@@ -0,0 +1,17 @@
+name: Asset Uploader
+on:
+ push:
+ paths:
+ - "packages/asset-uploader/**/*"
+ - ".github/workflows/asset-uploader.yml"
+ - ".github/actions/publish/action.yaml"
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: ./.github/actions/publish
+ with:
+ workdir: ./packages/asset-uploader
+ filter: "@webstudio-is/asset-uploader"
+ token: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/design-system.yml b/.github/workflows/design-system.yml
index 109456bc75..b7b00db417 100644
--- a/.github/workflows/design-system.yml
+++ b/.github/workflows/design-system.yml
@@ -1,4 +1,4 @@
-name: Design System Publish
+name: Design System
on:
push:
paths:
@@ -12,5 +12,6 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/publish
with:
- package: "./packages/design-system/package.json"
+ workdir: ./packages/design-system
+ filter: "@webstudio-is/design-system"
token: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/eslint-config-custom.yml b/.github/workflows/eslint-config-custom.yml
index 3effb53420..86952ce555 100644
--- a/.github/workflows/eslint-config-custom.yml
+++ b/.github/workflows/eslint-config-custom.yml
@@ -1,4 +1,4 @@
-name: Eslint Config Publish
+name: Eslint Config
on:
push:
paths:
@@ -12,5 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/publish
with:
- package: "./packages/eslint-config-custom/package.json"
+ skip-build: true
+ workdir: ./packages/eslint-config-custom
+ filter: "@webstudio-is/eslint-config-custom"
token: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/http-client.yml b/.github/workflows/http-client.yml
new file mode 100644
index 0000000000..6a7ef77b88
--- /dev/null
+++ b/.github/workflows/http-client.yml
@@ -0,0 +1,17 @@
+name: HTTP Client
+on:
+ push:
+ paths:
+ - "packages/http-client/**/*"
+ - ".github/workflows/http-client.yml"
+ - ".github/actions/publish/action.yaml"
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: ./.github/actions/publish
+ with:
+ workdir: ./packages/http-client
+ filter: "@webstudio-is/http-client"
+ token: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/icons.yml b/.github/workflows/icons.yml
index 3deb808f0b..9a62e16ccc 100644
--- a/.github/workflows/icons.yml
+++ b/.github/workflows/icons.yml
@@ -1,4 +1,4 @@
-name: Icons Publish
+name: Icons
on:
push:
paths:
@@ -12,5 +12,6 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/publish
with:
- package: "./packages/icons/package.json"
+ workdir: ./packages/icons
+ filter: "@webstudio-is/icons"
token: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/jest-config.yml b/.github/workflows/jest-config.yml
index 2d5a1079cb..76d6fe8a56 100644
--- a/.github/workflows/jest-config.yml
+++ b/.github/workflows/jest-config.yml
@@ -1,4 +1,4 @@
-name: Jest Config Publish
+name: Jest Config
on:
push:
paths:
@@ -12,5 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/publish
with:
- package: "./packages/jest-config/package.json"
+ skip-build: true
+ workdir: ./packages/jest-config
+ filter: "@webstudio-is/jest-config"
token: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/react-sdk.yml b/.github/workflows/react-sdk.yml
index 9a122a632b..8bf0dd349e 100644
--- a/.github/workflows/react-sdk.yml
+++ b/.github/workflows/react-sdk.yml
@@ -1,4 +1,4 @@
-name: SDK publish
+name: React SDK
on:
push:
paths:
@@ -12,5 +12,6 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/publish
with:
- package: "./packages/react-sdk/package.json"
+ workdir: ./packages/react-sdk
+ filter: "@webstudio-is/react-sdk"
token: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/tsconfig.yml b/.github/workflows/tsconfig.yml
index f9b6ed774e..276926a981 100644
--- a/.github/workflows/tsconfig.yml
+++ b/.github/workflows/tsconfig.yml
@@ -1,4 +1,4 @@
-name: Tsconfig Publish
+name: Tsconfig
on:
push:
paths:
@@ -12,5 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/publish
with:
- package: "./packages/tsconfig/package.json"
+ skip-build: true
+ workdir: ./packages/tsconfig
+ filter: "@webstudio-is/tsconfig"
token: ${{ secrets.NPM_TOKEN }}