From 9f8c7deaf9531b441b0f0876039db43fb4880943 Mon Sep 17 00:00:00 2001 From: Dominique Wirz Date: Mon, 19 Feb 2024 18:10:26 +0100 Subject: [PATCH] fix: try release on PR merged --- .github/workflows/release.yml | 17 ++++++++++------- package.json | 3 +-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e64d30a..aa07c779 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ name: Release on: - push: + pull_request: + types: [closed] branches: - main @@ -9,7 +10,8 @@ concurrency: cancel-in-progress: true jobs: - test: + publish: + if: github.event.pull_request.merged == true strategy: fail-fast: true name: publish @@ -21,11 +23,12 @@ jobs: node-version-file: '.nvmrc' - run: npm ci - run: npm run build:stencil-react-ssr-output-target - - name: Configure Git User for Release - run: | - git config --global user.name "smartive CI" - git config --global user.email "it@smartive.ch" - - run: npm run publish:stencil-react-ssr-output-target + - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + git config --global user.name "smartive CI" + git config --global user.email "it@smartive.ch" + npx lerna version --conventional-commits --conventional-graduate --yes + npx lerna publish from-git --yes diff --git a/package.json b/package.json index 910b3672..10904fdd 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,7 @@ "build:cdn-build": "lerna run build --skip-nx-cache --scope=abc-cdn-build", "build:docs": "lerna run build --skip-nx-cache --scope=abc-docs", "build:app": "lerna run build --skip-nx-cache --scope=abc-app", - "start:app": "lerna run start --skip-nx-cache --scope=abc-app", - "publish:stencil-react-ssr-output-target": "lerna version --conventional-commits --conventional-graduate=* --yes && lerna publish --yes" + "start:app": "lerna run start --skip-nx-cache --scope=abc-app" }, "engines": { "node": "^20.0.0",