From c13edf921e6e90797963d112a1eb5f08c9c4af78 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 31 May 2021 08:13:53 -0400 Subject: [PATCH] Reduce the number of releases Signed-off-by: Sebastian Malton --- .github/workflows/publish-master-npm.yml | 6 +++++- build/set_npm_version.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-master-npm.yml b/.github/workflows/publish-master-npm.yml index f8b4d51694..68a599c1d8 100644 --- a/.github/workflows/publish-master-npm.yml +++ b/.github/workflows/publish-master-npm.yml @@ -1,12 +1,16 @@ name: Publish NPM Package `master` on: - push: + pull_request: branches: - master + types: + - closed jobs: publish: name: Publish NPM Package `master` runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + if: ${{ contains(github.event.pull_request.labels.*.name, 'area/extension') }} strategy: matrix: node-version: [12.x] diff --git a/build/set_npm_version.ts b/build/set_npm_version.ts index 696503a6bc..c0b24b54a6 100644 --- a/build/set_npm_version.ts +++ b/build/set_npm_version.ts @@ -33,7 +33,7 @@ if (NPM_RELEASE_TAG !== "latest") { encoding: "utf-8", }); - version.inc("prerelease", gitRef.trim()); + version.inc("prerelease", `git.${gitRef.trim()}`); } packageInfo.version = version.format();