From 84db9a0bc7cd08a75464da6ed5a794fce1e0d876 Mon Sep 17 00:00:00 2001 From: danstarns Date: Wed, 12 Feb 2025 10:37:32 -0800 Subject: [PATCH] ci: add publish rc --- .../workflows/release-grapesjs-react-rc.yml | 22 +++++++++++++++++++ package.json | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-grapesjs-react-rc.yml diff --git a/.github/workflows/release-grapesjs-react-rc.yml b/.github/workflows/release-grapesjs-react-rc.yml new file mode 100644 index 0000000..b96521f --- /dev/null +++ b/.github/workflows/release-grapesjs-react-rc.yml @@ -0,0 +1,22 @@ +name: Publish GrapesJS React rc +on: + push: + branches: [main] + +jobs: + publish: + if: "contains(github.event.head_commit.message, 'Release GrapesJS React rc:')" + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup project + uses: ./.github/actions/setup-project + - name: Build + run: yarn build:core + - name: Publish to npm + env: + NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }} + run: | + echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ./packages/grapesjs-react/.npmrc + yarn publish:core:rc diff --git a/package.json b/package.json index f89e8ad..32286d7 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ "build:app-18": "yarn workspace @grapesjs/react-app-18 run build", "build:app-19": "yarn workspace @grapesjs/react-app-19 run build", "release:core:latest": "ts-node scripts/releaseCore latest", - "publish:core:latest": "cd packages/grapesjs-react && npm publish --access public" + "release:core:rc": "ts-node scripts/releaseCore rc", + "publish:core:latest": "cd packages/grapesjs-react && npm publish --access public", + "publish:core:rc": "cd packages/grapesjs-react && npm publish --tag rc --access public" }, "workspaces": { "packages": [