From fe7a1a0b0a53439d0d2b8d303aafb82314903e8e Mon Sep 17 00:00:00 2001 From: Igor Randjelovic Date: Mon, 1 Feb 2021 12:27:52 +0100 Subject: [PATCH] ci: add inputs to manual dispatch --- .github/workflows/npm_release_tns_core.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/npm_release_tns_core.yml b/.github/workflows/npm_release_tns_core.yml index f8e941a46..252574949 100644 --- a/.github/workflows/npm_release_tns_core.yml +++ b/.github/workflows/npm_release_tns_core.yml @@ -6,9 +6,18 @@ on: paths: - 'nativescript-core/**' workflow_dispatch: + inputs: + tag: + description: 'NPM Tag' + required: false + default: 'tns-next' + version: + description: 'NPM Version' + required: false env: - NPM_TAG: 'tns-next' + NPM_TAG: ${{ github.event.inputs.tag || 'tns-next' }} + NPM_VERSION: ${{ github.event.inputs.version }} jobs: release: @@ -21,6 +30,7 @@ jobs: run: npm install - name: Generate Version + if: ${{ !env.NPM_VERSION }} run: | echo NPM_VERSION=$(node -e "console.log(require('./package.json').version);")-$NPM_TAG-$(date +"%m-%d-%Y")-$GITHUB_RUN_ID >> $GITHUB_ENV @@ -63,10 +73,10 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} run: | - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ../.npmrc + #echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ../.npmrc echo "Publishing @nativescript/core@$NPM_VERSION to NPM with tag $NPM_TAG..." - npm publish nativescript-core-$NPM_VERSION.tgz --tag $NPM_TAG + #npm publish nativescript-core-$NPM_VERSION.tgz --tag $NPM_TAG echo "Publishing tns-core-modules@$NPM_VERSION to NPM with tag $NPM_TAG..." - npm publish tns-core-modules-$NPM_VERSION.tgz --tag $NPM_TAG + #npm publish tns-core-modules-$NPM_VERSION.tgz --tag $NPM_TAG